Files
cloudpods/docs/README.md
2019-07-27 17:58:41 +08:00

21 lines
554 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# swagger.yaml
使用swagger编辑器
docker run -d -p 8081:8080 swaggerapi/swagger-editor
swagger文档https://swagger.io/docs/specification/2-0/basic-structure/
编辑测试:
1. 首先启动swagger-ui
sudo docker pull swaggerapi/swagger-ui
sudo docker run -d -p 80:8080 swaggerapi/swagger-ui
2. 用python启动本地的http server这是允许CORS的SimpleHTTPServer监听在8000端口
python server.py
3. 用浏览器打开swagger-ui的URLhttp://<swagger_ui_host>?url=http://<simple_http_server_host>:8000/index.yaml