yarcode/yii2-swagger

Swagger 与 Yii2 的集成

安装次数: 89

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 4

分支: 1

开放性问题: 0

类型:yii2-extension

0.1 2016-12-05 08:55 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:53:13 UTC


README

安装

安装此扩展的首选方法是通过 composer

运行以下命令之一:

php composer.phar require --prefer-dist yarcode/yii2-swagger

或者添加

"yarcode/yii2-swagger": "*"

用法

TODO: 应该详细描述。

public function init()
{
    $this->controllerMap = [
        'swagger' => [
            'class' => 'YarCode\Yii2\Swagger\SwaggerController',
            'host' => 'http://some.host',
            'basePath' => '/base/path/to/swagger/doc',,
            'templateFile' => '/@api/path/to/swagger/template.yaml',
            'includePaths' => [
                '/include/path/first',
                '/include/path/second',
            ],
        ]
    ];
    parent::init();
}

许可证

MIT

版权所有 (c) 2016 lichunqiang, YarCode