You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$comment is informational and similar in feel to metadata annotations, but it belongs to the JSON Schema core vocabulary rather than the annotation vocabulary tracked in Add metadata annotation keywords #40.
Identifier/reference methods should configure the enclosing/current schema node when used inside a schema block.
Dynamic references need documented semantics before implementation, especially around recursive schemas and $defs.
Acceptance criteria
Root schemas can declare $id.
Subschemas can declare anchors where appropriate.
Core identifier/comment methods work as current-node modifiers inside supported nested schema blocks.
Dynamic references have documented behavior before implementation.
Goal
Add support for Draft 2020-12 core identifier and reference keywords:
$id$anchor$comment$dynamicAnchor$dynamicRef$vocabularyThe gem already emits
$defsand$ref.Meanings
$idgives a schema or subschema a URI identity.$anchorcreates a named local reference target.$commentis a schema-author comment.$dynamicAnchorand$dynamicRefare advanced keywords for recursive and dynamic reference behavior.$vocabularydeclares which JSON Schema vocabularies the schema uses.Proposed DSL
At the root level:
Inside nested schemas, these should follow the same current-node modifier direction as #40 where the keyword is valid for that schema node:
Design notes
$commentis informational and similar in feel to metadata annotations, but it belongs to the JSON Schema core vocabulary rather than the annotation vocabulary tracked in Add metadata annotation keywords #40.$defs.Acceptance criteria
$id.