Convert OpenAPI 3.0 to Swagger 2.0

后端 未结 1 1277
孤城傲影
孤城傲影 2020-12-14 07:24

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.

相关标签:
1条回答
  • 2020-12-14 07:55
    • LucyBot api-spec-converter (online version, GitHub repo, Node.js module) can convert from OpenAPI 3.0 to 2.0.

    • API Transformer also claims to be able to convert OpenAPI 3.0 back to OpenAPI 2.0. There's a command-line version too.

    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).

    0 讨论(0)
提交回复
热议问题