问题
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.
来源:https://stackoverflow.com/questions/36774452/can-i-create-a-stub-swagger-model-definition-from-a-json-file