Skip to content

Commit 1bf7155

Browse files
committed
Remove bookending requirement for dynamicRef
1 parent 5f783b8 commit 1bf7155

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

jsonschema-core.xml

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,27 +1478,22 @@
14781478
<t>
14791479
Together with "$dynamicAnchor", "$dynamicRef" implements a cooperative
14801480
extension mechanism that is primarily useful with recursive schemas
1481-
(schemas that reference themselves). Both the extension point and the
1482-
runtime-determined extension target are defined with "$dynamicAnchor",
1483-
and only exhibit runtime dynamic behavior when referenced with
1484-
"$dynamicRef".
1481+
(schemas that reference themselves). The extension point is defined with
1482+
"$dynamicAnchor" and only exhibits runtime dynamic behavior when referenced
1483+
with "$dynamicRef".
14851484
</t>
14861485
<t>
1487-
The value of the "$dynamicRef" property MUST be a string which is
1488-
a URI-Reference. Resolved against the current URI base, it produces
1489-
the URI used as the starting point for runtime resolution. This initial
1490-
resolution is safe to perform on schema load.
1486+
The value of the "$dynamicRef" property MUST be a string which is a
1487+
URI-Reference that contains a valid <xref target="anchor">plain name
1488+
fragment</xref>. Resolved against the current URI base, it indicates
1489+
the schema resource used as the starting point for runtime resolution.
1490+
This initial resolution is safe to perform on schema load.
14911491
</t>
14921492
<t>
1493-
If the initially resolved starting point URI includes a fragment that
1494-
was created by the "$dynamicAnchor" keyword, the initial URI MUST be
1495-
replaced by the URI (including the fragment) for the outermost schema
1496-
resource in the <xref target="scopes">dynamic scope</xref> that defines
1497-
an identically named fragment with "$dynamicAnchor".
1498-
</t>
1499-
<t>
1500-
Otherwise, its behavior is identical to "$ref", and no runtime
1501-
resolution is needed.
1493+
The schema to apply is the outermost schema resource in the
1494+
<xref target="scopes">dynamic scope</xref> that defines a
1495+
"$dynamicAnchor" that matches the plain name fragment in the initially
1496+
resolved URI.
15021497
</t>
15031498
<t>
15041499
For a full example using these keyword, see appendix

0 commit comments

Comments
 (0)