Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Swagger migration from 1.2 to 2.0 specification

I have Swagger 1.2 JSON spec which I wanted to migrate to Swagger 2.0. Can someone help with that?

like image 319
Rohit Goyal Avatar asked Mar 10 '16 10:03

Rohit Goyal


2 Answers

You can use api-spec-converter (open-source, MIT license).

api-spec-converter https://api.gettyimages.com/swagger/api-docs --from=swagger_1 --to=swagger_2 > swagger.json
like image 113
William Cheng Avatar answered Oct 18 '22 13:10

William Cheng


The official swagger codegen allows for this as well:

https://generator.swagger.io/#!/clients/generateClient

Select swagger-yaml from the drop-down and put the URL into the GeneratorInput example. It will give you a link to download the swagger definition.

like image 20
fehguy Avatar answered Oct 18 '22 12:10

fehguy