diff --git a/jsonschema-core.xml b/jsonschema-core.xml index e292e275..bfe5a8e9 100644 --- a/jsonschema-core.xml +++ b/jsonschema-core.xml @@ -100,7 +100,7 @@ This specification defines JSON Schema core terminology and mechanisms, including pointing to another JSON Schema by reference, - dereferencing a JSON Schema reference, + dereferencing a JSON Schema reference or embedding its target, specifying the vocabulary being used, and defining the expected output. @@ -409,11 +409,6 @@ canonically identified by an absolute URI. - - As discussed in section - , a JSON Schema document - can contain multiple JSON Schema resources. - The root schema is the schema that comprises the entire JSON document in question. The root schema is always a schema resource, where the @@ -442,6 +437,15 @@ As with the root schema, a subschema is either an object or a boolean. + + As discussed in section + , a JSON Schema document + can contain multiple JSON Schema resources. When used without qualification, + the term "root schema" refers to the document's root schema. In some + cases, resource root schemas are discussed. A resource's root schema + is its top-level schema object, which would also be a document root schema + if the resource were to be extracted to a standalone JSON Schema document. + @@ -624,7 +628,7 @@ Note that some keywords, such as "$schema", apply to the lexical scope of the entire schema document, and therefore MUST only - appear in the document's root schema. + appear in a schema resource's root schema. Other keywords may take into account the dynamic scope that @@ -1131,11 +1135,15 @@ media type "application/schema+json". - The "$schema" keyword SHOULD be used in a root schema. - It MUST NOT appear in subschemas. If absent from the root schema, the + The "$schema" keyword SHOULD be used in a resource root schema. + It MUST NOT appear in resource subschemas. If absent from the root schema, the resulting behavior is implementation-defined. + If multiple schema resources are present in a single document, then all + schema resources SHOULD Have the same value for "$schema". The result of + differing values for "$schema" within the same schema document is + implementation-defined. Using multiple "$schema" keywords in the same document would imply that the feature set and therefore behavior can change within a document. This would @@ -1145,6 +1153,12 @@ implementation behavior is subject to be revised or liberalized in future drafts. + + The exception made for embedded schema resources is to + allow bundling multiple schema resources into a single schema document + without needing to change their contents, as described later in this + specification. +