-
Swagger有点不好用。当然可以在github上部署,但是html文件里面找不到url
使用连接:https://github.com/peter-evans/swagger-github-pages
swagger-github
git clone https://github.com/swagger-api/swagger-ui.git(还有editer)
然后同级文件夹输入http-server -p 8080 swagger-editor
其中使用了一些终端命令行
在某文件夹创建py文件
vim main.py
终止代码Esc
:wq
一些使用教程:
https://www.jianshu.com/p/d6626e6bd72c -
最后使用redoc部署,感觉界面比swagger要略丑一点。但是比较方便
一键部署:npx redoc-cli bundle openapi.yaml
教程链接:https://dmlls.medium.com/redoc-docs-on-gh-pages-97a8926e9e0f
另外附检索技巧:学会用英文思维、语句在谷歌检索信息
参考网页:https://docs.stats.etdchain.net/?doc=health_service_schema