json-schema-spec icon indicating copy to clipboard operation
json-schema-spec copied to clipboard

Clarify how schemas embedded inside other document types are identified

Open gregsdennis opened this issue 9 months ago • 3 comments

Core 4.3.5 has the following:

The root schema is the schema that comprises the entire JSON document in question. The root schema is always a schema resource, where the URI is determined as described in section 9.1.1.

along with the following as an editor's note:

Note that documents that embed schemas in another format will not have a root schema resource in this sense. Exactly how such usages fit with the JSON Schema document and resource concepts will be clarified in a future draft.

I assume this is to cover cases like OpenAPI, which embed JSON Schema directly into their own document, which means that the entire document cannot be the root schema.

We need to clarify this.

gregsdennis avatar May 23 '24 21:05 gregsdennis