|
790 | 790 | <t>
|
791 | 791 | A schema that itself describes a schema is called a meta-schema.
|
792 | 792 | Meta-schemas are used to validate JSON Schemas and specify which vocabulary
|
793 |
| - it is using. |
| 793 | + they are using. |
794 | 794 | </t>
|
795 | 795 | <t>
|
796 | 796 | Authors of extensions to JSON Schema are encouraged to write their own
|
|
819 | 819 | <t>
|
820 | 820 | The role of the meta-schema is to constrain the structure of conforming schemas,
|
821 | 821 | as well as simplify the process of composing multiple vocabularies into a usable
|
822 |
| - feature set. Schema authoring is obviously expected to be a common activity, so |
| 822 | + feature set. Schema authoring is expected to be a common activity, so |
823 | 823 | schema authors need only understand how to reference a single meta-schema.
|
824 | 824 | </t>
|
825 | 825 | <t>
|
|
880 | 880 | </t>
|
881 | 881 | <t>
|
882 | 882 | Values for this property are defined elsewhere in this and other documents,
|
883 |
| - and by other parties. JSON Schema implementations SHOULD implement support |
884 |
| - for current and previous published drafts of JSON Schema vocabularies |
885 |
| - as deemed reasonable. |
| 883 | + and by other parties. |
886 | 884 | </t>
|
887 | 885 | </section>
|
888 | 886 | <section title='The "$vocabulary" Keyword'>
|
889 | 887 | <t>
|
890 |
| - The "$vocabulary" keyword, like all keywords in meta-schemas, |
891 |
| - relates to the schema described by the meta-schema, rather than |
892 |
| - to the meta-schema itself. Specifically, "$vocabulary" declares |
| 888 | + The "$vocabulary" keyword, which appears in a meta-schema, declares |
893 | 889 | what sets of keywords are expected to be used in schemas described
|
894 |
| - by this meta-schema. |
| 890 | + by that meta-schema, and with what semantics. This is conceptually |
| 891 | + analogous to how most other keywords used in meta-schemas describe |
| 892 | + the syntax of keywords used in schemas described by that meta-schema. |
895 | 893 | </t>
|
896 | 894 | <t>
|
897 | 895 | The value of this keyword MUST be an object. The property names in the
|
|
940 | 938 | for use as a meta-schema. This is demonstrated in
|
941 | 939 | <xref target="example-meta-schema">the example meta-schema</xref>.
|
942 | 940 | </t>
|
| 941 | + <t> |
| 942 | + If "$vocabulary" is absent, an implementation MAY determine |
| 943 | + behavior based on the meta-schema if it is recognized from the |
| 944 | + URI value of the referring schema's "$schema" keyword. |
| 945 | + If the meta-schema, as referenced by the schema, is not recognized, |
| 946 | + then implementations MAY assume the use of all vocabularies in this |
| 947 | + specification and the companion Validation specification. |
| 948 | + </t> |
943 | 949 | </section>
|
944 | 950 | <section title="Detecting a Meta-Schema">
|
945 | 951 | <t>
|
|
993 | 999 | restricting usage to a subset of a vocabulary, and for validating
|
994 | 1000 | locally defined keywords not intended for re-use.
|
995 | 1001 | </t>
|
| 1002 | + <t> |
| 1003 | + However, meta-schemas SHOULD NOT contradict any vocabularies that |
| 1004 | + they declare, such as by requiring a different JSON type than |
| 1005 | + the vocabulary expects. The resulting behavior is undefined. |
| 1006 | + </t> |
996 | 1007 | <t>
|
997 | 1008 | Meta-schemas intended for local use, with no need to test for
|
998 | 1009 | vocabulary support in arbitrary implementations, can safely omit
|
|
0 commit comments