cancel
Showing results for 
Search instead for 
Did you mean: 

Depending on parameter how to change response in swagger

SOLVED
New 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

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator

Re: Depending on parameter how to change response in swagger

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.

1 REPLY 1
Moderator

Re: Depending on parameter how to change response in swagger

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.

Top Kudoed Authors