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

Support JSON Schema 2020-12 #512

Open
horiuchi opened this issue Jul 27, 2021 · 1 comment
Open

Support JSON Schema 2020-12 #512

horiuchi opened this issue Jul 27, 2021 · 1 comment

Comments

@horiuchi
Copy link
Owner

horiuchi commented Jul 27, 2021

ref #511

JSON Schema 2019-09

https://json-schema.org/draft/2019-09/release-notes.html
"$schema": "https://json-schema.org/draft/2019-09/schema"

New Features

  • $anchor: Replaces the #plain-name form of $id, with a different syntax and approach
  • $id: Only URI-references without fragments are allowed; see $anchor for a replacement for plain-name fragments; all other fragments in $id had undefined behavior previously
  • $recursiveAnchor and $recursiveRef: Used for extending recursive schemas such as meta-schemas
  • $ref: Other keywords are now allowed alongside of it
  • unevaluatedItems: Similar to additionalItems, but can “see” into subschemas and across references
  • unevaluatedProperties: Similar to additionalProperties, but can “see” into subschemas and across references

New Properties

  • $defs: renamed from definitions
  • $vocabulary: Has effects only in meta-schemas
  • dependentSchemas and dependentRequired: split from dependencies
  • maxContains and minContains: Assertion for controlling how many times a subschema
  • deprecated: Used to indicate that a field is deprecated in some application-specific manner
  • const: It is similar to enum, but has only one value

JSON Schema 2020-12

https://json-schema.org/draft/2020-12/release-notes.html
"$schema": "https://json-schema.org/draft/2020-12"

New Features

  • $dynamicRef and $dynamicAnchor: The $recursiveRef and $recursiveAnchor keywords were replaced by the more powerful $dynamicRef and $dynamicAnchor keywords.
  • Support Embedded Schemas and Bundling

New Properties

  • prefixItems: replace from items
  • items: replace from additionalItems
@glen-84
Copy link
Contributor

glen-84 commented Aug 24, 2021

2019-09 adds support for const as well, I think.

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

No branches or pull requests

2 participants