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

Add json schema dialect property #675

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Azquelt
Copy link
Member

@Azquelt Azquelt commented Dec 3, 2024

Add jsonSchemaDialect to the model and annotations.

In the model test, I've put the JSON Schema 2020-12 dialect and as it's in the model, I expect it to be passed through as-is.

In the annotation test, I've put the OAS default schema dialect since I don't think we can reasonably rely on an implementation to have well defined behaviour for any other values. An implementation could reasonably do any of the following:

  • generate schemas in the specified dialect
  • generate schemas in the OAS default dialect and set $schema in all of them, overriding the default set at the top level
  • report an error and generate nothing

Fixes #660

Allows setting the default schema dialect for the OpenAPI document. The
only value we can test here is the default one, since that's the only
one that implementations must support.
Copy link
Member

@MikeEdgar MikeEdgar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks @Azquelt

@Azquelt
Copy link
Member Author

Azquelt commented Dec 10, 2024

I'd like to implement this in SmallRye before merging to validate that the new tests are passable.

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

Successfully merging this pull request may close these issues.

OpenAPI model object is missing jsonSchemaDialect property
2 participants