Can I create a stub swagger model definition from

2019-01-29 08:11发布

问题:

Is there a tool that lets me generate a Swagger yaml definition model from sample JSON?

I would go in and and edit and clean up the yaml, but would be nice if there was something out there that would stub out the structure of a yaml based on a large or complex sample json object.

回答1:

You can use Apigee's API Studio that has this feature:

http://apistudio.io/

Click on Insert menu and then New Model. Form a JSON example you can create all of the paths and operations you want.