Integration swagger-ui with Yii2.
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist dyonis/yii2-swagger "~1.0" --dev
or add
"dyonis/yii2-swagger": "~1.0"
to the require section of your composer.json
file.
Add to your application config:
'modules'=>[
...
'swagger'=> [
'class' => \dyonis\yii2\swagger\Module::class,
'apiDoc' => '@app/modules/api/v1/doc/swagger.yml',
'cacheDuration' => 1,
],
],