Skip to content

Commit

Permalink
Drop the initial resolve step for dynamic references
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesrosiers committed Oct 21, 2021
1 parent 5f783b8 commit ad4e9b1
Showing 1 changed file with 7 additions and 19 deletions.
26 changes: 7 additions & 19 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1478,27 +1478,15 @@
<t>
Together with "$dynamicAnchor", "$dynamicRef" implements a cooperative
extension mechanism that is primarily useful with recursive schemas
(schemas that reference themselves). Both the extension point and the
runtime-determined extension target are defined with "$dynamicAnchor",
and only exhibit runtime dynamic behavior when referenced with
"$dynamicRef".
(schemas that reference themselves). The extension point is defined
with "$dynamicAnchor", and only exhibits runtime dynamic behavior when
referenced with "$dynamicRef".
</t>
<t>
The value of the "$dynamicRef" property MUST be a string which is
a URI-Reference. Resolved against the current URI base, it produces
the URI used as the starting point for runtime resolution. This initial
resolution is safe to perform on schema load.
</t>
<t>
If the initially resolved starting point URI includes a fragment that
was created by the "$dynamicAnchor" keyword, the initial URI MUST be
replaced by the URI (including the fragment) for the outermost schema
resource in the <xref target="scopes">dynamic scope</xref> that defines
an identically named fragment with "$dynamicAnchor".
</t>
<t>
Otherwise, its behavior is identical to "$ref", and no runtime
resolution is needed.
The value of the "$dynamicRef" property MUST be a valid
<xref target="anchor">plain name fragment</xref>. The schema to apply is
the outermost schema resource in the <xref target="scopes">dynamic scope</xref>
that defines a "$dynamicAnchor" matching the value of this keyword.
</t>
<t>
For a full example using these keyword, see appendix
Expand Down

0 comments on commit ad4e9b1

Please sign in to comment.