-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Clarification on discriminator
usage on allOf
schemas.
#3424
Comments
|
I think the |
is there a use case of having discriminator and allof ? to me discriminator should only be use for the oneOf the usage of it inside an anyOf beeing quite alredy limited/corner case discriminator could even be dropped |
That's already what the specification says. Having a |
Sorry but what does "The discriminator object is legal only when using one of the composite keywords" means then? Edit: Reading the linked PR I now understand that this part of the spec is being reworked 😅 |
@handrews , @darrelmiller what about for OAS 4.0 or even for OAS 3.1 just dropping / deprecating discriminator at all , pushing all schema definition to json schema looks a better split of concern , all about schema is delegated to a certain version of Json schema , vs OAS spec is about API |
@LasneF OAS 4.0 a.k.a. Moonwalk is definitely separating concerns more thoroughly, including better separation between content schema formats and OAS "proper". There aren't any specifics on what that means yet, but it will be addressed in the coming year (note that there is a separate OAI/Moonwalk repository for that project). Doing any such thing would be too big of a change for a 3.1.x, or even a 3.2, although of course in 3.1 JSON Schema is at least theoretically extensible with 3rd-party keywords. |
PRs merged! closing. |
Hi, the spec says:
What's the meaning behind something like this?
I don't see an obvious intepretation for an schema that has both
discriminator
andallOf
.The text was updated successfully, but these errors were encountered: