Convert OpenAPI 3.0 to Swagger 2.0

Michal Foksa picture Michal Foksa · Jun 17, 2019 · Viewed 19.9k times · Source

Is there a generator to convert OpenAPI 3.0 to Swagger 2.0?

Mashery, an API gateway, requires Swagger 2.0 format on input to open endpoint.

Answer

Helen picture Helen · Jun 18, 2019

Keep in mind that OAS3→OAS2 convertion is lossy in general, because OAS3 has features that did not exist in OAS2 (such as multiple servers, oneOf/anyOf, different schemas per media type, objects in query string parameters, cookie parameters, and others).