我必须使用Swagger编辑器为其中一个应用程序记录REST API . 我已经浏览了一些可用的参考资料,但似乎没有任何东西显示出记录API的起点 .
https://swagger.io/docs/swagger-tools/#installation-11
已经下载了Swagger编辑器,并希望开始记录 . 任何特定的指针都可以帮助你 .
谢谢 .
问候,-Nayan Parikh
我必须使用Swagger编辑器为其中一个应用程序记录REST API . 我已经浏览了一些可用的参考资料,但似乎没有任何东西显示出记录API的起点 .
https://swagger.io/docs/swagger-tools/#installation-11
已经下载了Swagger编辑器,并希望开始记录 . 任何特定的指针都可以帮助你 .
谢谢 .
问候,-Nayan Parikh
1 回答
我能够开始记录API . 以下是我遵循的步骤,希望这可以帮助有需要的人 .
Documenting using Swagger-Editor
在线打开Swagger编辑器https://editor.swagger.io/或
从链接下载https://github.com/swagger-api/swagger-editor
转到文件夹swagger-editor并运行index.html
这将打开编辑器并根据https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md中提到的规范开始记录API
完成后,将其下载为JSON或YAML文件 .
Viewing it on Swagger-UI
从链接https://github.com/swagger-api/swagger-ui下载swagger-ui
转到dist文件夹并编辑index.html .
指定上面刚刚下载的JSON / YAML文件 .
通过运行index.html进行检查
希望这可以帮助
谢谢 .