Skip to content

Commit c947b03

Browse files
authored
Remove bookending requirement for dynamicRef (#1139)
* Remove bookending requirement for dynamicRef * Add $dynamicRef changes to change log
1 parent a06f315 commit c947b03

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

jsonschema-core.xml

+13-17
Original file line numberDiff line numberDiff line change
@@ -1483,27 +1483,22 @@
14831483
<t>
14841484
Together with "$dynamicAnchor", "$dynamicRef" implements a cooperative
14851485
extension mechanism that is primarily useful with recursive schemas
1486-
(schemas that reference themselves). Both the extension point and the
1487-
runtime-determined extension target are defined with "$dynamicAnchor",
1488-
and only exhibit runtime dynamic behavior when referenced with
1489-
"$dynamicRef".
1486+
(schemas that reference themselves). The extension point is defined with
1487+
"$dynamicAnchor" and only exhibits runtime dynamic behavior when referenced
1488+
with "$dynamicRef".
14901489
</t>
14911490
<t>
1492-
The value of the "$dynamicRef" property MUST be a string which is
1493-
a IRI-Reference. Resolved against the current IRI base, it produces
1494-
the IRI used as the starting point for runtime resolution. This initial
1495-
resolution is safe to perform on schema load.
1491+
The value of the "$dynamicRef" property MUST be a string which is a
1492+
IRI-Reference that contains a valid <xref target="anchor">plain name
1493+
fragment</xref>. Resolved against the current IRI base, it indicates
1494+
the schema resource used as the starting point for runtime resolution.
1495+
This initial resolution is safe to perform on schema load.
14961496
</t>
14971497
<t>
1498-
If the initially resolved starting point IRI includes a fragment that
1499-
was created by the "$dynamicAnchor" keyword, the initial IRI MUST be
1500-
replaced by the IRI (including the fragment) for the outermost schema
1501-
resource in the <xref target="scopes">dynamic scope</xref> that defines
1502-
an identically named fragment with "$dynamicAnchor".
1503-
</t>
1504-
<t>
1505-
Otherwise, its behavior is identical to "$ref", and no runtime
1506-
resolution is needed.
1498+
The schema to apply is the outermost schema resource in the
1499+
<xref target="scopes">dynamic scope</xref> that defines a
1500+
"$dynamicAnchor" that matches the plain name fragment in the initially
1501+
resolved IRI.
15071502
</t>
15081503
<t>
15091504
For a full example using these keyword, see appendix
@@ -3863,6 +3858,7 @@ https://example.com/schemas/common#/$defs/count/minimum
38633858
<t hangText="draft-bhutton-json-schema-next">
38643859
<list style="symbols">
38653860
<t>"contains" now applies to objects as well as arrays</t>
3861+
<t>Remove bookending requirement for "$dynamicRef"</t>
38663862
</list>
38673863
</t>
38683864
<t hangText="draft-bhutton-json-schema-00">

0 commit comments

Comments
 (0)