Yii2自动生成接口文档插件 yii2-doc-online

2017-8-29 liyangweb.com 李杨 PHP

    眼下前后端完全分离的开发模式是越来越火,好多项目都直接摒弃了常规的套页面方式,而改用前端控制主要业务逻辑,后端只提供接口数据的模式。这样一来,前后端就需要频繁的沟通接口含义。于是一个好的接口文档总是能事半功倍的,但是后台开发人员开发出接口后,写接口文档又是一个麻烦的事情,费时费力不说,当接口改动时,还要时刻记着去修改接口文档。

    介于本人平时需要开发很多接口,也要写很多文档,于是决定开发一款可以自动生成接口文档的小工具——yii2-doc-online,只要开发人员按照规范写好注释,那么接口文档就会自动生成了。

    代码已经开源与github,项目地址:https://github.com/kaopur/yii2-doc-online

    效果图见

标签: yii2 yii2-doc-online

评论:

ddspcollege
约 4 小时前
<a href="http://www.ddspcollege.com/air-jordan-retro-2-tutti-rosa-butyc">air jordan retro 2 tutti rosa</a> <a href="http://www.durulcamdag.com/kyrie-2-effect-for-vente-scarpeg">kyrie 2 effect for vente</a> <a href="http://www.fantasynz.com/hombres-supra-skytop-negro-oro-chaussuresb">hombres supra skytop negro oro</a> <a href="http://www.fresnotrip.com/adidas-climacool-fresh-ride-herre-l%C3%B8b-sko-on-salg-butya">adidas climacool fresh ride herre l酶b sko on salg</a> <a href="http://www.acincon.com/nike-lebron-soldier-10-blu-and-bianca-online-schuhed">nike lebron soldier 10 blu and bianca online</a> <a href="http://www.ayersrockapi.com/nike-air-max-noir-on-noir-chaussuresd">nike air max noir on noir</a>
ddspcollege http://www.ddspcollege.com/
foliekopen
2019-01-20 03:39
<a href="http://www.atolyekarinca.com/femminile-nike-shox-current-verde-rosa-chaussuresa">femminile nike shox current verde rosa</a> <a href="http://www.dfarrie.com/nike-steelers-11-markus-wheaton-green-stitched-limited-salute-to-service-jersey-nflf">nike steelers 11 markus wheaton green stitched limited salute to service jersey</a> <a href="http://www.mwsuperstore.com/billig-new-balance-990-menns-gr%C3%A5-runningg">billig new balance 990 menns gr氓</a> <a href="http://www.shanamorgan.com/zdeno-chara-33-boston-bruins-reebok-premier-alternate-jersey-small-nflv">zdeno chara 33 boston bruins reebok premier alternate jersey small</a> <a href="http://www.crisgarrett.com/air-jordan-3-womens-red-trainersa">air jordan 3 womens red</a> <a href="http://www.rejuvmedia.com/adidas-neo-ventilation-hvid-himmelbl%C3%A5-scarped">adidas neo ventilation hvid himmelbl氓</a>
foliekopen http://www.foliekopen.com/
miaclearbras
2019-01-03 00:32
<a href="http://www.myfraimz.com/nike-air-max-bw-ultra-se-mens-shoe-fit-skoa">nike air max bw ultra se mens shoe fit</a> <a href="http://www.winnercells.com/under-armour-clutchfit-drive-irish-gold-quarter-sneakere">under armour clutchfit drive irish gold quarter</a> <a href="http://www.atppest.com/jordan-retro-6-infrar%C3%B8d-gs-kurpesa">jordan retro 6 infrar酶d gs</a> <a href="http://www.windriftbar.com/under-armour-micro-g-torch-womens-grey-purple-sneakerb">under armour micro g torch womens grey purple</a> <a href="http://www.kidtokidboise.com/nike-blazer-low-schwarz-pink-shoesg">nike blazer low schwarz pink</a> <a href="http://www.mesmertronic.com/adidas-star-wars-hat-hats">adidas star wars hat</a>
miaclearbras http://www.miaclearbras.com/
rejuvmedia
2018-12-30 03:02
<a href="http://www.divyangmart.com/kyrie-2-krispy-kreme-for-sale-colorado-runninge">kyrie 2 krispy kreme for sale colorado</a> <a href="http://www.ezellhvac.com/big-boys-nike-hyperdunk-x-2018-black-white-zapatosu">big boys nike hyperdunk x 2018 black white</a> <a href="http://www.oldoyopark.com/nike-air-max-2017-gold-gr%C3%BCn-chaussuresa">nike air max 2017 gold gr眉n</a> <a href="http://www.racquetlady.com/elite-demarcus-ware-youth-jersey-denver-broncos-94-impact-black-nflg">elite demarcus ware youth jersey denver broncos 94 impact black</a> <a href="http://www.ankaralokanta.com/nike-air-max-thea-light-pink-nike-shoe-runningg">nike air max thea light pink nike shoe</a> <a href="http://www.mengenmetal.com/women-2012-new-nfl-jerseys-san-francisco-49ers-53-navorro-bowman-red-jerseys-hall-of-fames-50th-patch-nflv">women 2012 new nfl jerseys san francisco 49ers 53 navorro bowman red jerseys hall of fames 50th patch</a>
[url=http://www.rejuvmedia.com/]rejuvmedia[/url]
oz834rgf
2018-12-27 00:09
<a href="http://www.tvjuti65.com/adidas-rose-5-bl%C3%A5-guld-obuvc">adidas rose 5 bl氓 guld</a> <a href="http://www.pbyz412s.com/nike-free-run-5.0-rosa-oro-kurpesb">nike free run 5.0 rosa oro</a> <a href="http://www.x745mfcu.com/asics-gel-kayano-20-negro-plum-kurpesd">asics gel kayano 20 negro plum</a> <a href="http://www.dkouevy6.com/air-jordan-11-low-bleu-moon-up-kurpesc">air jordan 11 low bleu moon up</a> <a href="http://www.15wij42f.com/air-jordan-retro-9-gr%C3%BCn-blau-scarped">air jordan retro 9 gr眉n blau</a> <a href="http://www.5k71d4ly.com/nike-air-max-zero-himmelblau-gelb-schuhee">nike air max zero himmelblau gelb</a>
oz834rgf http://www.oz834rgf.com/
ccc
2018-07-27 15:14
这个高级模板有人配置成功了吗
ccc
2018-07-27 14:39
为什么配置好了接口列表是空的呢
接碰飞
2018-04-02 12:23
页面显示为空,是因为配置出现问题吗?
'modules' => [
        'doconline' => [
            'class' => 'Kaopur\yii2_doc_online\Module',
            'defaultRoute' => 'index', //默认控制器
            'appControllers' => true, //是否检测app\controllers命名空间下的控制器
            'suffix' => '', //api后缀
            'prefix' => '', //api前缀
            'modules' => [  //需要生成文档的模块命名空间
                'backend\controllers\IndexController'
            ],
        ],
    ],
ccc
2018-07-27 15:04
@接碰飞:我的也是这样配置,页面显示为这人,有正确的配置吗,能发一份不
代写essay
2017-10-27 20:41
支持楼主。
tengju
2017-10-18 13:34
yii2-doc-online未配置成功,'doconline' => [
                'item'           => 'frontend',
                'class'          => 'Kaopur\yii2_doc_online\Module',
                'defaultRoute'   => 'index',
                //默认控制器
                'appControllers' => true,
                //是否检测app\controllers命名空间下的控制器
                'suffix'         => '',
                //api后缀
                'prefix'         => '',
                //api前缀
                'modules'        => [  //需要生成文档的模块
                ],
            ],
根据教程,这样并不能为frontend生成api文档,求指导
liyangweb.com 李杨
2017-10-24 14:44
@tengju:之前兼容高级版有些问题,我会尽快修复,并发布新版本。谢谢关注
liyangweb.com 李杨
2017-10-25 09:43
@tengju:现已完美支持高级版和基础班,请升级至v2.0.0使用,配置文件略有变动,请知悉。

发表评论:

Powered by emlog 冀ICP备13011830号-1