Skip to content

Commit 1edbad0

Browse files
committed
removed IRI language from $dynamicRef passages
1 parent 48b346b commit 1edbad0

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

specs/jsonschema-core.md

+16-19
Original file line numberDiff line numberDiff line change
@@ -547,8 +547,8 @@ determined at runtime.
547547

548548
While custom identifier keywords are possible, extension designers should take
549549
care not to disrupt the functioning of core keywords. For example, the
550-
`$dynamicAnchor` keyword in this specification limits its IRI resolution effects
551-
to the matching `$dynamicRef` keyword, leaving the behavior of `$ref`
550+
`$dynamicAnchor` keyword in this specification limits its resolution behavior
551+
to matching `$dynamicRef` keywords, leaving the behavior of `$ref`
552552
undisturbed.
553553

554554
### Applicators {#applicators}
@@ -980,18 +980,9 @@ result is undefined, and even if documented will not be interoperable.
980980

981981
#### Schema References {#references}
982982

983-
Several keywords can be used to reference a schema which is to be applied to the
984-
current instance location. `$ref` and `$dynamicRef` are applicator keywords,
985-
applying the referenced schema to the instance.
986-
987-
As the values of `$ref` and `$dynamicRef` are IRI References, this allows the
988-
possibility to externalise or divide a schema across multiple files, and
989-
provides the ability to validate recursive structures through self-reference.
990-
991-
The resolved IRI produced by these keywords is not necessarily a network
992-
locator, only an identifier. A schema need not be downloadable from the address
993-
if it is a network-addressable URL. Implementations which can access the network
994-
SHOULD default to operating offline.
983+
`$ref` and `$dynamicRef` can be used to reference a schema which is to be
984+
applied to the current instance location. As such, they are considered
985+
applicators, applying the referenced schema to the instance.
995986

996987
##### Direct References with `$ref` {#ref}
997988

@@ -1006,22 +997,28 @@ Resolved against the current IRI base, it produces the IRI of the schema to
1006997
apply. This resolution is safe to perform on schema load, as the process of
1007998
evaluating an instance cannot change how the reference resolves.
1008999

1000+
The resolved IRI produced by `$ref` is not necessarily a network
1001+
locator, only an identifier. A schema need not be downloadable from the address
1002+
if it is a network-addressable URL. Implementations which can access the network
1003+
SHOULD default to operating offline.
1004+
10091005
##### Dynamic References with `$dynamicRef` {#dynamic-ref}
10101006

10111007
The `$dynamicRef` keyword is an applicator that allows for deferring the full
10121008
resolution until runtime, at which point it is resolved each time it is
10131009
encountered while evaluating an instance.
10141010

10151011
Together with `$dynamicAnchor`, `$dynamicRef` implements a cooperative extension
1016-
mechanism that is primarily useful to extend recursive schemas, where
1012+
mechanism that is primarily useful to to create open schemas, where
10171013
`$dynamicRef` defines the extension point and `$dynamicAnchor` defines the
10181014
target.
10191015

1020-
The value of the `$dynamicRef` property MUST be a valid
1021-
[plain name fragment](#fragments).[^3]
1016+
The value of the `$dynamicRef` property MUST be formatted as a valid
1017+
[IRI plain name fragment](#fragments).[^3]
10221018

1023-
[^3]: `$dynamicAnchor` defines the anchor with plain text, e.g. `foo`; the
1024-
`$dynamicRef` that references it uses a URI fragment syntax, e.g. `#foo`.
1019+
[^3]: `$dynamicAnchor` defines the anchor with plain text, e.g. `foo`. Although
1020+
the value of `$dynamicRef` is not an IRI fragment, for historical reasons, the
1021+
value still uses an IRI fragment syntax, e.g. `#foo`.
10251022

10261023
Resolution of `$dynamicRef` begins by identifying the outermost schema
10271024
resource in the [dynamic scope](#scopes) which defines a matching

0 commit comments

Comments
 (0)