2017 © Pedro Peláez
 

yii2-extension yii2-apidoc-generator

A simple comments generator in Apidoc.js format for your yii2 RESTFul API's

image

eold/yii2-apidoc-generator

A simple comments generator in Apidoc.js format for your yii2 RESTFul API's

  • Tuesday, July 21, 2015
  • by enryold
  • Repository
  • 2 Watchers
  • 6 Stars
  • 6,751 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 5 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

yii2-apidoc-generator

Yii2 Apidoc.js generator, (*1)

Yii2 Apidoc.js generator is a little helper that generate Apidoc.js comments for your yii2 RESTFul API actions on-demand. Just call your API's endpoints to generate the comment files. Then run apidoc scripts to generate your documentation., (*2)

PREREQUISITES

Install Apidoc.js (http://apidocjs.com/), (*3)

npm install apidoc -g

ADD APIDOC GENERATOR IN YOUR PROJECT

 "eold/yii2-apidoc-generator": "^1.0."
 ```


CONFIGURE 
---------

Put apidoc-generator in your Yii2 config file components

'docGenerator' =>[ 'class' => 'eold\apidocgen\src\ApiDocGenerator', 'isActive'=>true, // Flag to set plugin active 'versionRegexFind'=>'/(\w+)(\d+)/i', // regex used in preg_replace function to find Yii api version format (usually 'v1', 'vX') ... 'versionRegexReplace'=>'${2}.0.0', // .. and replace it in Apidoc format (usually 'x.x.x') 'docDataAlias'=>'@runtime/data_path' // Folder to save output. make sure is writable. ],, (*4)


Then, add apidoc-generator in bootstrap section

'bootstrap' => ['log', 'v1', 'docGenerator'],, (*5)


USAGE --------- Everytime you call an endpoint of your API's, ApiDocGenerator try to writes the corresponding Apidoc.js comment file. If an output file was already generated it will NOT be overwrited. You have to delete it and call the endpoint again. Then, you have to call Apidoc.js to generate the doc

apidoc -i -o ```, (*6)

The Versions

21/07 2015

dev-master

9999999-dev

A simple comments generator in Apidoc.js format for your yii2 RESTFul API's

  Sources   Download

BSD

The Development Requires

by Enrico Vecchio

yii2 generator apidoc apidoc.js

21/07 2015

v1.0.2

1.0.2.0

A simple comments generator in Apidoc.js format for your yii2 RESTFul API's

  Sources   Download

BSD

The Development Requires

by Enrico Vecchio

yii2 generator apidoc apidoc.js

20/07 2015

v1.0.1

1.0.1.0

A simple comments generator in Apidoc.js format for your yii2 RESTFul API's

  Sources   Download

BSD

The Development Requires

by Enrico Vecchio

yii2 generator apidoc apidoc.js

20/07 2015

1.0.0

1.0.0.0

A simple comments generator in Apidoc.js format for your yii2 RESTFul API's

  Sources   Download

BSD

The Development Requires

by Enrico Vecchio

yii2 generator apidoc apidoc.js