[oXygen-user] [OXYGEN-6052] Why is the JSON Schema $anchor not supported?

Oxygen XML Editor Support (Florin Nica) support at oxygenxml.com
Tue Jun 27 03:01:11 CDT 2023


Hi Roger,

Thank you very much for the feedback.

We use a third-party library for JSON Schema validation and, 
unfortunately, it does not support the "$anchor" and "$dynamicAnchor" 
keywords. This is mentioned as a limitation in our user-guide 
<https://www.oxygenxml.com/doc/versions/25.1/ug-editor/topics/json-validating-json-schema.html#json-validating-json-schema__section_n4d_llf_y5b>, 
but, indeed, the message displayed for "$anchor" is not accurate at all.

We plan to provide full support for JSON Schema /Draft 2020-12/ in the 
near future by using another library. I will let you know when this 
support is ready.

Regards,
Florin
On 6/22/2023 9:25 PM, Roger L Costello wrote:
> 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 at oxygenxml.com
> https://www.oxygenxml.com/mailman/listinfo/oxygen-user
>
-- 
Florin Nica
<oXygen/> XML Editor
www.oxygenxml.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.oxygenxml.com/pipermail/oxygen-user/attachments/20230627/298a0d55/attachment.htm>


More information about the oXygen-user mailing list