PHPackages                             eold/yii2-apidoc-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. eold/yii2-apidoc-generator

ActiveYii2-extension[API Development](/categories/api)

eold/yii2-apidoc-generator
==========================

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

v1.0.2(10y ago)89.0k4[5 issues](https://github.com/enryold/yii2-apidoc-generator/issues)BSDPHP

Since Jul 20Pushed 9y ago2 watchersCompare

[ Source](https://github.com/enryold/yii2-apidoc-generator)[ Packagist](https://packagist.org/packages/eold/yii2-apidoc-generator)[ RSS](/packages/eold-yii2-apidoc-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

yii2-apidoc-generator
=====================

[](#yii2-apidoc-generator)

Yii2 Apidoc.js generator

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.

PREREQUISITES
-------------

[](#prerequisites)

Install Apidoc.js ()

```
npm install apidoc -g

```

ADD APIDOC GENERATOR IN YOUR PROJECT
------------------------------------

[](#add-apidoc-generator-in-your-project)

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

```

CONFIGURE
---------

[](#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.
        ],

```

Then, add apidoc-generator in bootstrap section

```
'bootstrap' => ['log', 'v1', 'docGenerator'],

```

USAGE
-----

[](#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

```

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance8

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

3948d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cf4e6d3f28c3cd426485af3b6f9e3e6c7c3c69ea30673bf8825fdbf023d0f76?d=identicon)[enryold](/maintainers/enryold)

---

Top Contributors

[![enryold](https://avatars.githubusercontent.com/u/3513160?v=4)](https://github.com/enryold "enryold (13 commits)")

---

Tags

api-documentationapidocapidoc-commentsapidoc-generatorapidocsyii2generatoryii2apidocapidoc.js

### Embed Badge

![Health badge](/badges/eold-yii2-apidoc-generator/health.svg)

```
[![Health](https://phpackages.com/badges/eold-yii2-apidoc-generator/health.svg)](https://phpackages.com/packages/eold-yii2-apidoc-generator)
```

###  Alternatives

[crada/php-apidoc

Generate documentation for php API based application. No dependency. No framework required.

259206.9k2](/packages/crada-php-apidoc)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
