We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Is there any way in swagger definitions to specify that either one parameter or another is required, but not both?
e.g. firstname OR fullname is required, but not both
Thanks.
The text was updated successfully, but these errors were encountered:
As of Swagger 2.0 it's not possible. What you can do is defining this logic in your 400 response.
--- swagger: '2.0' info: version: 1.0.0 title: Pets Store paths: /pets: get: parameters: - name: firstName in: query description: First Nam type: string - name: fullName in: query description: description type: string responses: 400: description: | ##### Bad request You have to specifiy either `firstName` or `fullName` parameter.
Sorry, something went wrong.
Thanks. I was thinking of specifying it in the summary possibly in addition to your suggestion with the response.
#256 is where we're discussion possibility of adding a feature for cases like this in Swagger.Next
No branches or pull requests
Hi,
Is there any way in swagger definitions to specify that either one parameter or another is required, but not both?
e.g. firstname OR fullname is required, but not both
Thanks.
The text was updated successfully, but these errors were encountered: