How to generate a Swagger #definition from sample JSON

后端 未结 3 1418
伪装坚强ぢ
伪装坚强ぢ 2021-01-04 10:37

Take the following #definition from the pet store example. Given a #definition section a JSON structure can be generated

e.g.

Is there something that can do

3条回答
  •  余生分开走
    2021-01-04 11:19

    1 - Paste a response in http://www.mocky.io and get a link to your response

    2 - Go to https://inspector.swagger.io/ and make a call to your example response

    3 - Select the call from "History" and click "Create API definition"

    4 - The swagger definition will be available at https://app.swaggerhub.com/

提交回复
热议问题