-
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
oneOf behaviour clarification #3477
Comments
(my interpretation of the spec) It should not validate: |
So based on that, should the documentation be changed to say that it is NOT a valid input for the given oneOf example ? |
you are right , but notice that the website you refer belong to SmartBear , and not OAS specficiation. That said you can ping them for sure . The OAS spec could have this kind of sample, but this would also be the duty of JsonSchema Try to grab SmartBear Folks to fix it will be indeed good for the community as they are an important actor over there |
Since there is no problem with the specification here (which is what this repo is for), I'm going to close it. But I join the other folks in encouraging you to file this issue with SmartBear/Swagger! Thank you for asking about it :-) |
We were going through the oneOf explanations given in the swagger website.
As mentioned above, in the case of oneOf, the input
is a valid input. But, looking closely at the given spec, we see that it is a valid input for both the schemas, since neither the
required
, nor thediscriminator
keyword is defined in any schema (Cat or Dog), which means that the above input is a valid input for both the schemas.Can you please clarify if the above input is a valid input for the given schema or not ?
Thanks.
The text was updated successfully, but these errors were encountered: