1. Go to this page and download the library: Download wolfpack-it/yii2-swagger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wolfpack-it / yii2-swagger example snippets
public function init()
{
$this->scanDirs = [
\Yii::getAlias('@api/models'),
\Yii::getAlias('@api/controllers'),
];
parent::init;
}
'swagger' => [
'oAuthConfiguration' => [
'baseUrl' => 'https://example.com/oauth/', // must end with a / (forward slash)
'securityScheme' => 'exampleSecurity', // will be used to auto login
'username' => '[email protected]', // will be used to auto login
'password' => 'example', // will be used to auto login
'clientId' => 'example-client', // will be used to auto login
'clientSecret' => 'example', // will be used to auto login
]
]
html
"zircote/swagger-php": "<latest version> as 2.0.0",
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.