Forum Discussion

shirin1's avatar
shirin1
New Contributor
7 years ago

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 P...
  • RonRatovsky's avatar
    7 years ago

    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.