Swagger 建立 api文档 代码地址:https://github.com/klren0312/stm32_wifi 2017.4.4
(1)介绍 The World's Most Popular API Framework(世界最流行的API模板)。
(2)工具
(3)网址 http://swagger.io/
swagger
(1)Swagger Editor编写
1
2
3
(2)Swagger UI界面
1.在express中定义静态文件路由app.use('/static',express.static('public'));
2.将Swagger UI 代码clone到本地 git clone https://github.com/swagger-api/swagger-ui.git
3.在express项目文件夹中,新建一个叫public文件夹,将clone后的代码中的dist文件下所有文件复制到public文件夹。
4.http://localhost:3000/static/index.html访问即可
QQ截图20170404161611.png
QQ截图20170404161842.png
QQ截图20170404161852.png
@治电小白菜20170404