shirin1
6 years agoNew Contributor
Depending on parameter how to change response in swagger
Hi,
I want to change the response value depending on the paramter.
for example:-
I want to send response as Cat when 1 parameter and Dog when 2 parameter is passed.
Thanks,
Shirin Parkar
Hello,
Currently the OpenAPI/Swagger specifications do not support differentiation based on query parameters - not for input nor for output. Work on supporting it is candidate for future versions of the spec, you can find out more information at https://github.com/OAI/OpenAPI-Specification/issues/182.