-
Notifications
You must be signed in to change notification settings - Fork 391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for deprecated keyword (Fixes #441) #542
Conversation
…on with the deprecated comment
…n e2e test to test outcome of a true deprecated between a true deprecated and a false deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
/** | ||
* property exists at least in https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.3 | ||
*/ | ||
deprecated?: boolean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to contribute this to the upstream @types/json-schema
typings, since this isn't JSTT-specific.
Published json-schema-to-typescript@13.1.0 |
Fixes #441
Referencing:
json-schema-spec PR: json-schema-org/json-schema-spec#737
json-schema doc: https://json-schema.org/draft/2019-09/json-schema-validation.html#rfc.section.9.3
Support for the deprecated keyword is added as per the example laid out in #441.
Modified parser.ts, generator.ts, & validator.ts.
Added deprecated property to AST.ts and JSONschema.ts