Package Data | |
---|---|
Maintainer Username: | soliang |
Maintainer Contact: | soliang@dingtalk.com (soliang) |
Package Create Date: | 2019-04-09 |
Package Last Update: | 2019-04-10 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-15 15:24:00 |
Package Statistics | |
---|---|
Total Downloads: | 1 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 0 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Swagger 2.0 for Lumen 5
对 SwaggerLume 进行封装。 使其支持YAML文档。
composer require --dev soliangd/lumen-yaml-swagger
bootstrap/app.php
$app->withFacades();
$app->configure('yaml-swagger');
$app->register(\Soocoo\Swagger\SwaggerLumenServiceProvider::class);
config/yaml-swagger.php
:
[
"paths" => [
"yaml_annotations" => [base_path('docs')] // 默认目录
]
]
注意nginx配置时将 swagger路由重定向 swagger文档支持
location ~ /(swagger-ui-assets) {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
````php