|
790 | 790 | </section>
|
791 | 791 | </section>
|
792 | 792 |
|
793 |
| - <section title='Schema References With "$ref"'> |
| 793 | + <section title="Schema References"> |
| 794 | + <t> |
| 795 | + Two keywords are provided for referencing one schema from another, and |
| 796 | + for validating recursive structures through self-reference. |
| 797 | + Both of these keywords behave as |
| 798 | + <xref target="in-place">in-place applicators</xref>, except that the schema |
| 799 | + being applied is identified rather than appearing as all or part of the |
| 800 | + keyword's value. |
| 801 | + </t> |
| 802 | + |
794 | 803 | <section title='Direct References with "$ref"'>
|
795 | 804 | <t>
|
796 |
| - The "$ref" keyword is used to reference a schema, and provides the ability |
797 |
| - to validate recursive structures through self-reference. |
| 805 | + The "$ref" keyword is used to reference a statically identified schema. |
798 | 806 | </t>
|
799 | 807 | <t>
|
800 | 808 | An object schema with a "$ref" property MUST be interpreted as a "$ref"
|
|
809 | 817 | when they encounter a network-addressable URI.
|
810 | 818 | </t>
|
811 | 819 | <t>
|
812 |
| - A schema MUST NOT be run into an infinite loop against a schema. For |
| 820 | + A schema MUST NOT be run into an infinite loop against an instance. For |
813 | 821 | example, if two schemas "#alice" and "#bob" both have an "allOf" property
|
814 | 822 | that refers to the other, a naive validator might get stuck in an infinite
|
815 | 823 | recursive loop trying to validate the instance. Schemas SHOULD NOT make
|
816 | 824 | use of infinite recursive nesting like this; the behavior is undefined.
|
817 | 825 | </t>
|
818 | 826 | </section>
|
819 | 827 |
|
820 |
| - <section title='Recursive references with "$recurse"'> |
| 828 | + <section title='Recursive References with "$recurse"'> |
| 829 | + <t> |
| 830 | + The "$recurse" keyword is used to construct extensible recursive schemas. |
| 831 | + </t> |
821 | 832 | <t>
|
822 | 833 | This keyword's value MUST be the boolean literal true.
|
823 | 834 | <cref>
|
|
831 | 842 | </t>
|
832 | 843 | <t>
|
833 | 844 | The presence of this keyword with a boolean true value indicates that,
|
834 |
| - during processing, it MUST be treated as a reference to the |
| 845 | + during processing, it MUST be treated as a reference to the root of the |
835 | 846 | <xref target="schema-documents">schema document</xref> where processing
|
836 |
| - was initiated. |
| 847 | + was initiated. The current base URI is not relevant to "$recurse". |
837 | 848 | </t>
|
838 | 849 | <t>
|
839 | 850 | This document, known as the entry point schema, is the schema document that
|
840 | 851 | was initially supplied to the implementation, as opposed to schema documents
|
841 | 852 | that were processed as a result of following a "$ref" reference. Note that
|
842 | 853 | even if processing began at a subschema within a document, the "$recurse"
|
843 |
| - target MUST be the root of the document. |
| 854 | + target MUST be the root schema. |
844 | 855 | </t>
|
845 | 856 | <t>
|
846 | 857 | Aside from the dynamic definition of the reference target, a "$recurse"
|
|
1092 | 1103 | </t>
|
1093 | 1104 | </section>
|
1094 | 1105 |
|
1095 |
| - <section title="Keywords for Applying Subschemas in Place"> |
| 1106 | + <section title="Keywords for Applying Subschemas in Place" |
| 1107 | + anchor="in-place"> |
1096 | 1108 | <t>
|
1097 | 1109 | These keywords apply subschemas to the same location in the instance
|
1098 | 1110 | as the parent schema is being applied. They allow combining
|
|
0 commit comments