luckynvic / yii2-rest-doc
Yii2 REST Documentation Generator
Installs: 20 180
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- crada/php-apidoc: @dev
- phpdocumentor/reflection: ^1.0.3
This package is not auto-updated.
Last update: 2025-03-29 23:04:57 UTC
README
Yii2 rest api document generator. This extension use yii console to build rest api documentation using php-apidoc.
Installation
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.
Setup
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',
],
],