tp5集成swagger

1.安装swagger-php插件

  composer require zircote/swagger-php

2.下载swagger-ui

  https://pan.baidu.com/s/1GcRe6VAYYLoe6XWOuib97w

3.生成swagger.json

  php /opt/lampp/htdocs/tp5/vendor/zircote/swagger-php/bin/swagger /opt/lampp/htdocs/tp5/vendor/zircote/swagger-php/Examples -o /opt/lampp/htdocs/tp5/public/swagger-docs

4.访问http://www.域名.com/swagger-ui/dist/

posted @ 2018-08-11 10:41  sunan  阅读(682)  评论(0编辑  收藏  举报