Skip to content

Commit 194b545

Browse files
committed
Move "$ref" section below "$id"
Talking about references and dereferencing makes more sense after we establish base URIs and subschema identfication. This commit just moves the section, subsequent commits will adjust the text and titles accordingly.
1 parent 677f162 commit 194b545

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

jsonschema-core.xml

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -527,33 +527,6 @@
527527
</t>
528528
</section>
529529

530-
<section title='Schema References With "$ref"'>
531-
<t>
532-
The "$ref" keyword is used to reference a schema, and provides the ability to
533-
validate recursive structures through self-reference.
534-
</t>
535-
<t>
536-
An object schema with a "$ref" property MUST be interpreted as a "$ref" reference.
537-
The value of the "$ref" property MUST be a URI Reference.
538-
Resolved against the current URI base, it identifies the URI of a schema to use.
539-
All other properties in a "$ref" object MUST be ignored.
540-
</t>
541-
<t>
542-
The URI is not a network locator, only an identifier. A schema need not be
543-
downloadable from the address if it is a network-addressable URL, and
544-
implementations SHOULD NOT assume they should perform a network operation when they
545-
encounter a network-addressable URI.
546-
</t>
547-
<t>
548-
A schema MUST NOT be run into an infinite loop against a schema. For example, if two
549-
schemas "#alice" and "#bob" both have an "allOf" property that refers to the other,
550-
a naive validator might get stuck in an infinite recursive loop trying to validate
551-
the instance.
552-
Schemas SHOULD NOT make use of infinite recursive nesting like this; the behavior is
553-
undefined.
554-
</t>
555-
</section>
556-
557530
<section title="Base URI and Dereferencing">
558531
<section title="Initial Base URI">
559532
<t>
@@ -652,6 +625,36 @@
652625
<t hangText="#/definitions/C">urn:uuid:ee564b8a-7a87-4125-8c96-e9f123d6766f</t>
653626
</list>
654627
</t>
628+
</section>
629+
630+
<section title='Schema References With "$ref"'>
631+
<t>
632+
The "$ref" keyword is used to reference a schema, and provides the ability to
633+
validate recursive structures through self-reference.
634+
</t>
635+
<t>
636+
An object schema with a "$ref" property MUST be interpreted as a "$ref" reference.
637+
The value of the "$ref" property MUST be a URI Reference.
638+
Resolved against the current URI base, it identifies the URI of a schema to use.
639+
All other properties in a "$ref" object MUST be ignored.
640+
</t>
641+
<t>
642+
The URI is not a network locator, only an identifier. A schema need not be
643+
downloadable from the address if it is a network-addressable URL, and
644+
implementations SHOULD NOT assume they should perform a network operation when they
645+
encounter a network-addressable URI.
646+
</t>
647+
<t>
648+
A schema MUST NOT be run into an infinite loop against a schema. For example, if two
649+
schemas "#alice" and "#bob" both have an "allOf" property that refers to the other,
650+
a naive validator might get stuck in an infinite recursive loop trying to validate
651+
the instance.
652+
Schemas SHOULD NOT make use of infinite recursive nesting like this; the behavior is
653+
undefined.
654+
</t>
655+
</section>
656+
657+
<section title="Dereferencing">
655658
<section title="Internal References">
656659
<t>
657660
Schemas can be identified by any URI that has been given to them, including

0 commit comments

Comments
 (0)