0

Hi i am learning Open API Specification and i am having a doubt regarding the request and response As Described in this link There is a requestBody object and a Responses object for a path. But i have to define that for a particular input there should be particular output with respective error code How can implement this in Open API Specification

Thanks in advance

  • Possible duplicate of [Swagger; specify two responses with same code based on optional parameter](https://stackoverflow.com/questions/36576447/swagger-specify-two-responses-with-same-code-based-on-optional-parameter) – Helen Jan 24 '18 at 16:31
  • Also related: [How to specify alternative response formats with swagger/OpenAPI?](https://stackoverflow.com/q/39136565/113116), [Swagger - Set the “response” based on “consumes”](https://stackoverflow.com/q/38827278/113116), [How to define different responses for same HTTP status code in OpenAPI (Swagger)?](https://stackoverflow.com/q/47447403/113116), [How to specify multiple 404 causes in OpenAPI (Swagger)?](https://stackoverflow.com/q/40640669/113116) – Helen Jan 24 '18 at 16:31

0 Answers0