swagger-editor 怎么用

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/hongchangfirst/article/details/80648390

可以将swagger-editor装在本地上进行编辑json/yaml 文件,然后preview。非常方便。

首先下载swagger-editor:

git clone https://github.com/swagger-api/swagger-editor.git

cd swagger-editor

python -m SimpleHTTPServer 8888

如果不行试试这个:

python -m http.server 8888

然后打开浏览器http://0.0.0.0:8888/

就可以看到一个PetStore的例子。如果你已经有了swagger的json/yaml文件,你可以import,然后就可以看到了,还可以进行本地修改,再export成json/yaml文件。还支持json和yaml文件之间的互相转换。

这个swagger-editor项目基本上使用各种js库实现的。

原文:http://blog.csdn.net/hongchangfirst/article/details/80648390

作者:hongchangfirst

hongchangfirst的主页:http://blog.csdn.net/hongchangfirst

猜你喜欢

转载自blog.csdn.net/hongchangfirst/article/details/80648390
今日推荐