Yii Swagger intergration package was updated to version 1.1.0. In this version an ability to configure Yii\Swagger\Middleware\SwaggerJson
via config/params.php
was added:
//...
'yiisoft/yii-swagger' => [
'annotation-paths' => [
'@src/Controller' // Directory where annotations are used
],
'cacheTTL' => 60 // Enables caching and sets TTL, "null" value means infinite cache TTL.
]
//...