yunhanphp / lumen-dev-yaml-swagger
Swagger文档,用PHP注释可读性差,维护性差,使用YAML格式
v1.0.3
2018-08-30 04:40 UTC
Requires
- php: >=7.1.3
- darkaonline/swagger-lume: ^5.5
- laravel/lumen-framework: ^5.5
- symfony/yaml: ^4.1
Requires (Dev)
- fzaninotto/faker: ~1.4
- mockery/mockery: ~1.0
- phpunit/phpunit: 7.0.*
- satooshi/php-coveralls: ^2.0
This package is not auto-updated.
Last update: 2024-11-10 06:12:31 UTC
README
Swagger 2.0 for Lumen 5
对 SwaggerLume 进行封装。 使其支持YAML文档。
安装
composer require --dev yunhanphp/lumen-dev-yaml-swagger
bootstrap/app.php
- 去掉门面注释:
$app->withFacades();
- 添加配置加载:
$app->configure('swagger-lume');
- 注册服务:
$app->register(\YunhanDev\Swagger\SwaggerLumenServiceProvider::class);
- 配置YAML目录
config/swagger-lume.php
:[ "paths" => [ "yamlAnnotations" => [base_path('docs')] // 默认目录 ] ]