定制 yangsl/apidoc 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

yangsl/apidoc

Composer 安装命令:

composer require yangsl/apidoc

包简介

yii2-apidoc

README 文档

README

yii2 apidoc

根据注释或者定义的对象文件生成接口文档。

yii2 basic版本 测试通过 yii2 advance版本 测试通过

Installation

The preferred way to install this extension is through composer.

composer require yangsl/apidoc

config add to modules

    'api-document' => [
        'class' => 'yangsl\apidoc\Module',
        'defaultRoute' => 'default', //默认控制器
        'appFolder' => 'admin',
        'appControllers' => true, //是否检测app\controllers命名空间下的控制器
        'modules' => [  //需要生成文档的模块命名空间
            'app\modules\test\Module',
        ],
    ],

访问

http://domain/api-document

注释

    /**
     * 这是一个测试的Api
     * @desc 列举所有的注释格式
     *
     * @param string $user_type |用户类型|true||其他说明|
     * @param int $sex |性别|true|0|0:不限 1:男 2:女|
     *
     * @return int status 操作码,0表示成功
     * @return string msg 提示信息
     * @return array list 用户列表
     * @return int list[].id 用户ID
     * @return string list[].name 用户名字
     *
     * @exception 400 参数传递错误
     * @exception 500 服务器内部错误
     */

or

    /**
     * 这是一个测试的Api
     * @desc 列举所有的注释格式
     *
     * @apidoc \app\structs\DemoRequest
     *
     * @exception 400 参数传递错误
     * @exception 500 服务器内部错误
     */

统计信息

  • 总下载量: 20
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固