yii2-docYII2 接口文檔工具
YII2接口文檔工具:
使用注釋自動(dòng)生成基于YII2的接口文檔,自動(dòng)獲取模型中注釋。
安裝方式
composer require chatfeed/yii2-doc "*"
配置
'module'=>[ 'doc' => [ 'class' => 'cfd\doc\Module', 'modelDescriptions'=>require __DIR__.'/model_description.php', 'modelsMap'=>[ '\common\base_models\kds\\', ] ] ]
用戶自定義模型
return [ 'demo'=>[ ['object','demo','模型'], ['integer','id','ID'], ['string','name','名稱'], ['string','desc','描述'], ['integer','created_at','創(chuàng)建時(shí)間'], ['integer','updated_at','更新時(shí)間'], ] ];
評(píng)論
圖片
表情
