Skip to content
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

Merged
merged 9 commits into from
Aug 27, 2023

Conversation

TravisChong
Copy link
Contributor

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

@TravisChong TravisChong marked this pull request as ready for review July 26, 2023 20:30
Copy link
Owner

@bcherny bcherny left a 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
Copy link
Owner

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.

@bcherny bcherny merged commit f797848 into bcherny:master Aug 27, 2023
15 checks passed
@bcherny
Copy link
Owner

bcherny commented Aug 27, 2023

Published json-schema-to-typescript@13.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for deprecated keyword
4 participants