Closed
Description
https://github.com/json-schema-org/json-schema-spec/blob/master/jsonschema-core.xml#L254
The suggestion to extend meta-schemas using allOf (assuming that one of subschemas is $ref) is not feasible because meta-schemas are recursive and they have references to the meta-schema itself ("#"
). Therefore if meta-schema is extended using $ref to the original meta-schema the # ref in that meta-schema will not point to the extended one, it will still point to the original, so the schemas would not be properly validated.
The only working meta-schema extension mechanism at the moment is copy-pasting and adding keywords, suggestion to use allOf is misleading because it implies $ref.
We have several options:
- Suggest copy-pasting with explanation why it is the only working option
- Adopt $merge/$patch keywords proposed by @fge
- Drop this suggestion from this version of the spec until we agree what is the right thing.
Happy to draft 1, can draft 2 as well...