itjackjw 2019-05-05 18:05:03 1391次浏览 0条评论 0 0 0

6.png

使用

/**
 * 测试方法
 *
 * @ApiTitle    (测试名称)
 * @ApiSummary  (测试描述信息)
 * @ApiMethod   (POST)
 * @ApiSector   (测试分组)
 * @ApiRoute    (/api/demo/test/id/{id}/name/{name})
 * @ApiHeaders  (name=token, type=string, required=true, description="请求的Token")
 * @ApiParams   (name="id", type="integer", required=true, description="会员ID")
 * @ApiParams   (name="name", type="string", required=true, description="用户名")
 * @ApiParams   (name="data", type="object", sample="{'user_id':'int','user_name':'string','profile':{'email':'string','age':'integer'}}", description="扩展数据")
 * @ApiReturnParams   (name="code", type="integer", required=true, sample="0")
 * @ApiReturnParams   (name="msg", type="string", required=true, sample="返回成功")
 * @ApiReturnParams   (name="data", type="object", sample="{'user_id':'int','user_name':'string','profile':{'email':'string','age':'integer'}}", description="扩展数据返回")
 * @ApiReturn   ({
'code':'1',
'msg':'返回成功'
})

安装

composer require itjackjw/yii2-apidoc

查看 https://github.com/itjackjw/yii2-apidoc

亿速云
    没有找到数据。
您需要登录后才可以评论。登录 | 立即注册