注释引用

使用的是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"),

    * )

    */

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容