Skip to content

Clarify default dialect for referenced JSON Schema documents #3877

@handrews

Description

@handrews

We need to clarify that jsonSchemaDialect (whether defaulted or explicitly set) governs the dialect throughout the document in which it appears, regardless of how the schema object was reached via referencing.

However, we need to also determine how to handle fragmentary documents, including standalone JSON Schema documents (which are Schema Object fragmentary documents from OAS's point of view). The most logically consistent view is to say that it's always document-scoped, and if your document does not have an OpenAPI Object at the root, if you want to change the schema behavior you need to use $id and $schema to do it.

But it's definitely going to be implementation-defined for fragmentary documents except if schemas have $schema (and $id if the schema is not a document root, as $id is necessary for $schema to be usable in a non-document-root schema).

It might be good to wait until we know which of PR #3823 or PR #3855 get merged, as they are working with similar concepts.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions