Skip to content

Commit 92249ec

Browse files
committed
Add note explainging why dynamic anchor is limited to fragid syntax
1 parent e95565d commit 92249ec

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

specs/jsonschema-core.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,12 +1097,17 @@ referencing schema.
10971097
The value of the `$dynamicRef` property MUST be a string and MUST conform to the
10981098
plain name fragment identifier syntax defined in {{fragments}}.[^3]
10991099

1100-
[^3]: `$dynamicAnchor` and `$dynamicRef` form a string-matched pair.
1100+
[^3]: The reason for limiting `$dynamicAnchor` to fragment identifier syntax no
1101+
longer exists because it isn't used in URIs, but the restriction remains to
1102+
avoid changing things that don't have a compelling reason to change.
1103+
1104+
`$dynamicAnchor` and `$dynamicRef` form a string-matched pair.
11011105

11021106
Resolution of `$dynamicRef` begins by identifying the outermost schema resource
11031107
in the [dynamic scope](#scopes) which defines a matching `$dynamicAnchor`. The
1104-
schema to apply is the subschema of this resource which contains the matching
1105-
`$dynamicAnchor`. If no matching `$dynamicAnchor` is found, see {{failed-refs}}.
1108+
schema to apply is the subschema of this resource which contains a
1109+
`$dynamicAnchor` matching the value of `$dynamicRef`. If no matching
1110+
`$dynamicAnchor` is found, see {{failed-refs}}.
11061111

11071112
For a full example using these keywords, see {{dynamic-example}}.[^9]
11081113

0 commit comments

Comments
 (0)