dev-master
9999999-devSwagger viewer for multi-document yaml specs
MIT
The Requires
extension yii2 swagger yaml swagger-merger
Swagger viewer for multi-document yaml specs
Viewer of a separate yaml/json swagger docs. Include swagger multi-doc merger, so you can format your docs in multiple files for faster edits., (*1)
This package is based on our SwaggerTools pack., (*2)
Example of docs to view can be found here: SwaggerTools docs example, (*3)
As extra feature, you can provide additional properties to generate enums, which are usually used by mock servers to generate test responses. We recommend Prism mock server. If you specify correct validation rules (like minimum, maximum, minItems, maxItems, etc.) it will generate nice mocks with data generated by faker php lib., (*4)
The preferred way to install this extension is through composer., (*5)
Either run, (*6)
php composer.phar require --prefer-dist justcoded/yii2-swaggerviewer "*"
or add, (*7)
"justcoded/yii2-swaggerviewer": "*"
to the require section of your composer.json
file., (*8)
Add module to your web config file:, (*9)
'modules' => [ 'swagger' => [ 'class' => \justcoded\yii2\swaggerviewer\Module::class, 'docsPath' => '@app/docs/swagger/swagger.yaml', // use merger tool. if you have single file - can turn it off for faster load. 'multiDoc' => true, // enable faker tool. additional link will be provided to download fakered copy. 'fakerCopy' => true, 'fakerNum' => 10, // number of items to generate ], ],
Swagger viewer for multi-document yaml specs
MIT
extension yii2 swagger yaml swagger-merger