From 19ccdb648fce6ea49652359be1c1b785bd34d20b Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Wed, 13 Nov 2024 11:21:05 +1300 Subject: [PATCH] clarify that a meta-schema applies to the schema resource, not necessarily the whole document --- specs/jsonschema-core.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specs/jsonschema-core.md b/specs/jsonschema-core.md index 350e45ba..db79974a 100644 --- a/specs/jsonschema-core.md +++ b/specs/jsonschema-core.md @@ -833,9 +833,11 @@ Meta-schemas are used to inform an implementation how to interpret a schema. Every schema has a meta-schema, which can be explicitly declared using the `$schema` keyword. -The meta-schema serves to describe valid schema syntax. A schema MUST +The meta-schema serves to describe valid schema syntax. A schema resource MUST successfully validate against its meta-schema, which constrains the syntax of -the available keywords. The syntax described for a given keyword is expected to +the available keywords. (See {{compound-validation}} for information on +validating schemas which contain embedded schema resources that declare a +different meta-schema.) The syntax described for a given keyword is expected to be compatible with the document which defines the keyword; while it is possible to describe an incompatible syntax, such a meta-schema would be unlikely to be useful. @@ -1339,7 +1341,7 @@ Since any schema that can be referenced can also be embedded, embedded schema resources MAY specify different processing dialects using the `$schema` values from their enclosing resource. -#### Validating +#### Validating {#compound-validation} Given that a Compound Schema Document may have embedded resources which identify as using different dialects, these documents SHOULD NOT be validated by applying