Open ajlende opened 3 weeks ago
Hi, can I work on this?
Hi, can I work on this?
@DivyanshVinayak23 Absolutely!
Check out the contributing guidelines, specifically the developer section, for general information on how to contribute code.
The #core-editor
channel on Make WordPress Slack (registration required) is also a good place to ask questions if you have any.
I noticed we use the ajv-draft-04
npm package, and I can't find an alternative for draft-07...
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
.