-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Update JSON schemas to use draft-07 #62462
Copy link
Copy link
Closed
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Metadata
Metadata
Assignees
Labels
Good First IssueAn issue that's suitable for someone looking to contribute for the first timeAn issue that's suitable for someone looking to contribute for the first time[Type] Code QualityIssues or PRs that relate to code qualityIssues or PRs that relate to code quality[Type] EnhancementA suggestion for improvement.A suggestion for improvement.
Type
Fields
Give feedbackNo fields configured for issues without a type.
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:
$commentkeyword to explain reasoning behind schema decisions inline.propertyNameskeyword 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.jsonthat requirestype,title, anddescriptionproperties which we should be using and provides links to understanding-json-schema for each hint/check to help new JSON Schema contributors.*PropertiesCompletecan be updated to usepropertyNamesinstead of lists of empty objects.enumproperties with single values can be updated toconstwhere it would make sense to useconst.