注释引用

2021-07-23  本文已影响0人  評常訫

使用的是ThinkPHP-ApiDoc 注释插件 

网址:https://hgthecode.github.io/thinkphp-apidoc/guide/install/


/* 注释引用 start */

use hg\apidoc\annotation\Group;

use hg\apidoc\annotation\Title;

use hg\apidoc\annotation\Author;

use hg\apidoc\annotation\Url;

use hg\apidoc\annotation\Method;

use hg\apidoc\annotation\Param;

use hg\apidoc\annotation\Returned;

/* 注释引用 end */


插件模板

/**

    * @Title("基础的注释方法")

    * @Desc("最基础的接口注释写法")

    * @Method("GET")

    * @Tag("测试 基础")

    * @Param("username", type="abc",require=true, desc="用户名" )

    * @Param("password", type="string",require=true, desc="密码" )

    * @Param("phone", type="string",require=true, desc="手机号" )

    * @Param("sex", type="int",default="1",desc="性别" )

    * @Returned("data", type="array", desc="返回数据",

    *    @Returned("id", type="int", desc="id"),

    * )

    */

上一篇 下一篇

猜你喜欢

热点阅读