Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify default dialect for referenced JSON Schema documents #3877

Closed
handrews opened this issue Jun 4, 2024 · 1 comment
Closed

Clarify default dialect for referenced JSON Schema documents #3877

handrews opened this issue Jun 4, 2024 · 1 comment
Assignees
Milestone

Comments

@handrews
Copy link
Member

handrews commented Jun 4, 2024

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.

@handrews
Copy link
Member Author

PR merged for 3.1.1!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant