Skip to content

Commit fe2a46f

Browse files
committed
Remove bookending requirement for dynamicRef (#1139)
* Remove bookending requirement for dynamicRef * Add $dynamicRef changes to change log
1 parent 4920b36 commit fe2a46f

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
@@ -1510,27 +1510,22 @@
15101510
<t>
15111511
Together with "$dynamicAnchor", "$dynamicRef" implements a cooperative
15121512
extension mechanism that is primarily useful with recursive schemas
1513-
(schemas that reference themselves). Both the extension point and the
1514-
runtime-determined extension target are defined with "$dynamicAnchor",
1515-
and only exhibit runtime dynamic behavior when referenced with
1516-
"$dynamicRef".
1513+
(schemas that reference themselves). The extension point is defined with
1514+
"$dynamicAnchor" and only exhibits runtime dynamic behavior when referenced
1515+
with "$dynamicRef".
15171516
</t>
15181517
<t>
1519-
The value of the "$dynamicRef" property MUST be a string which is
1520-
a IRI-Reference. Resolved against the current IRI base, it produces
1521-
the IRI used as the starting point for runtime resolution. This initial
1522-
resolution is safe to perform on schema load.
1518+
The value of the "$dynamicRef" property MUST be a string which is a
1519+
IRI-Reference that contains a valid <xref target="anchor">plain name
1520+
fragment</xref>. Resolved against the current IRI base, it indicates
1521+
the schema resource used as the starting point for runtime resolution.
1522+
This initial resolution is safe to perform on schema load.
15231523
</t>
15241524
<t>
1525-
If the initially resolved starting point IRI includes a fragment that
1526-
was created by the "$dynamicAnchor" keyword, the initial IRI MUST be
1527-
replaced by the IRI (including the fragment) for the outermost schema
1528-
resource in the <xref target="scopes">dynamic scope</xref> that defines
1529-
an identically named fragment with "$dynamicAnchor".
1530-
</t>
1531-
<t>
1532-
Otherwise, its behavior is identical to "$ref", and no runtime
1533-
resolution is needed.
1525+
The schema to apply is the outermost schema resource in the
1526+
<xref target="scopes">dynamic scope</xref> that defines a
1527+
"$dynamicAnchor" that matches the plain name fragment in the initially
1528+
resolved IRI.
15341529
</t>
15351530
<t>
15361531
For a full example using these keyword, see appendix
@@ -3904,6 +3899,7 @@ https://example.com/schemas/common#/$defs/count/minimum
39043899
<list style="symbols">
39053900
<t>"contains" now applies to objects as well as arrays</t>
39063901
<t>Use IRIs instead of URIs</t>
3902+
<t>Remove bookending requirement for "$dynamicRef"</t>
39073903
</list>
39083904
</t>
39093905
<t hangText="draft-bhutton-json-schema-01">

0 commit comments

Comments
 (0)