Update JSON schemas to use draft-07 #62462
Labels
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
[Type] Code Quality
Issues or PRs that relate to code quality
[Type] Enhancement
A suggestion for improvement.
We've been following the SchemaStore best practices for the development of our JSON schemas. They recommend a schema version based on what is widely supported in editors and IDEs. Previously this was draft-04, so all of our schemas currently use that version. However the new recommendation is draft-07 which comes with some quality of life improvements that can improve the readability and maintainability of our JSON schemas. Namely:
$comment
keyword to explain reasoning behind schema decisions inline.propertyNames
keyword to improve merging of two or more object subschemas while limitingadditionalProperties
.Additionally, SchemaStore has an unofficial "strict mode" draft-07 meta schema
https://json.schemastore.org/metaschema-draft-07-unofficial-strict.json
that requirestype
,title
, anddescription
properties which we should be using and provides links to understanding-json-schema for each hint/check to help new JSON Schema contributors.*PropertiesComplete
can be updated to usepropertyNames
instead of lists of empty objects.enum
properties with single values can be updated toconst
where it would make sense to useconst
.The text was updated successfully, but these errors were encountered: