Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove bookending requirement for dynamicRef #1139

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 13 additions & 17 deletions jsonschema-core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1483,27 +1483,22 @@
<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
Relequestual marked this conversation as resolved.
Show resolved Hide resolved
"$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 IRI-Reference. Resolved against the current IRI base, it produces
the IRI used as the starting point for runtime resolution. This initial
resolution is safe to perform on schema load.
The value of the "$dynamicRef" property MUST be a string which is a
IRI-Reference that contains a valid <xref target="anchor">plain name
fragment</xref>. Resolved against the current IRI base, it indicates
the schema resource used as the starting point for runtime resolution.
Relequestual marked this conversation as resolved.
Show resolved Hide resolved
This initial resolution is safe to perform on schema load.
</t>
<t>
If the initially resolved starting point IRI includes a fragment that
was created by the "$dynamicAnchor" keyword, the initial IRI MUST be
replaced by the IRI (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 schema to apply is the outermost schema resource in the
Relequestual marked this conversation as resolved.
Show resolved Hide resolved
<xref target="scopes">dynamic scope</xref> that defines a
"$dynamicAnchor" that matches the plain name fragment in the initially
resolved IRI.
</t>
<t>
For a full example using these keyword, see appendix
Expand Down Expand Up @@ -3863,6 +3858,7 @@ https://example.com/schemas/common#/$defs/count/minimum
<t hangText="draft-bhutton-json-schema-next">
<list style="symbols">
<t>"contains" now applies to objects as well as arrays</t>
<t>Remove bookending requirement for "$dynamicRef"</t>
</list>
</t>
<t hangText="draft-bhutton-json-schema-00">
Expand Down