4 ms·
The metaschemas are useful but not strict enough. They don't set `additionalProperties: false`, which is great if you wanna extend the schema with your own prop
by stabbles 11mo ago
The metaschemas are useful but not strict enough. They don't set `additionalProperties: false`, which is great if you wanna extend the schema with your own properties, but it won't catch simple typos.
For example, the following issues pass under the metaschema.
{"foo": {"bar": { ... }}} # wrong
{"foo": {"type": "object", "properties": {"bar": { ... }}}} # correct
{"additional_properties": false} # wrong
{"additionalProperties": false} # correct
- gregsdennis 11mo agoThis is intentional because unknown keywords are permitted with JSON Schema 2020-12 and prior. We are changing this with the upcoming version, which means we'll be updating the meta-schema to enforce it as well.
- stabbles 11mo agoExcellent!
- eternityforest 11mo agoWill the new meta-schema still have any mechanism for things like the special keywords that editor UIs often need?