We have a current 2 GET endpoints with same path but produces different media type. How can I add them to the openAPI specification yaml ?
Solved! Go to Solution.
In OpenAPI 2.0:
swagger: "2.0" ... paths: /something: get: produces: - application/json - application/xml responses: 200: description: OK schema: ...
In OpenAPI 3.0:
openapi: 3.0.0 ... paths: /something: get: responses: '200': description: OK content: application/json: schema: ... application/xml: schema: ...
@HKosova Thanks for the reply. I forgot to mention that both responses also have different schemas. I see that we have the possibility in 3.0 but not in 2.0. Or do I miss something ?