Yii2 Swagger Extension
First of all, please make sure you have some basic concepts of Swagger OpenAPI and Swagger UI.
Then you can start with following steps:
tanghengzhi/yii2-swagger
extension
1. Install composer require tanghengzhi/yii2-swagger --dev
config/web.php
2. Add following lines to //config/web.php
$config = [
...
'modules' => [
'swagger' => [
'class' => 'tanghengzhi\swagger\Module',
],
],
...
]
config/params.php
3. Add following lines to 'swagger'=>[
'scan_dir'=>[
'app/controllers',
]
]