Description
As discussed in json-schema-org/understanding-json-schema#197, the examples for "Extending Closed Schemas" at https://json-schema.org/understanding-json-schema/reference/object.html?highlight=extending%20closed%20schemas#extending-closed-schemas are confusing, because of using an allOf
construct with a single constraint as replacement for a schema defined elsewhere that is subject to extension.
The key point of the section is the extension of a schema defined independently. Therefore, the examples should use the schema referencing syntax with $ref
and $defs
. Otherwise, the reader could be distracted from the schema extension aspect. Since the referencing constructs are not yet introduced at this point when reading the documents linearly, a forwards pointer to the definition of the schema reference constructs should be introduced.