Yii2 rest api document generator. This extension use yii console to build rest api documentation using php-apidoc.
Installation is recommended to be done via composer by running:
composer require luckynvic/yii2-rest-doc "*"
Alternatively you can add the following to the require
section in your composer.json
manually:
"luckynvic/yii2-rest-doc": "*"
Run composer update
afterwards.
Add to your console config
'controllerMap' => [
'build-rest-doc' => [
'class' => '\luckynvic\restdoc\BuilderController',
'sourceDirs' => [
'@api/controllers', // api controller path
],
'outputDir' => 'docs/rest',
'outputFile' => 'index.html',
//optional
'templatePath' => dirname(__DIR__).'/../docs/rest/template/index.html',
],
],