When I add "$anchor" to my JSON Schema, the Oxygen editor gives this error 
message:

        The keyword "$anchor" is not part of
        JSON Schema Draft 2020-12 specification.
        Therefore, it is ignored by the validation engine.

But that's not true. See section 8.2.2 of the 2020-12 specification 
(https://json-schema.org/draft/2020-12/json-schema-core.html#section-8.2.2): 

Using JSON Pointer fragments requires knowledge of the structure of the schema. 
When writing schema documents with the intention to provide re-usable schemas, 
it may be preferable to use a plain name fragment that is not tied to any 
particular structural location. This allows a subschema to be relocated without 
requiring JSON Pointer references to be updated.

The "$anchor" and "$dynamicAnchor" keywords are used to specify such fragments. 
They are identifier keywords that can only be used to create plain name 
fragments, rather than absolute URIs as seen with "$id"...
_______________________________________________
oXygen-user mailing list
oXygen-user@oxygenxml.com
https://www.oxygenxml.com/mailman/listinfo/oxygen-user

Reply via email to