PHPackages                             davin.bao/apidoc - 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. davin.bao/apidoc

ActiveLibrary

davin.bao/apidoc
================

A sample way to scan Swagger annotation documents

26JavaScript

Since Mar 16Pushed 9y ago1 watchersCompare

[ Source](https://github.com/davin-bao/apidoc)[ Packagist](https://packagist.org/packages/davin.bao/apidoc)[ RSS](/packages/davinbao-apidoc/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![Build Status](https://camo.githubusercontent.com/fb22ed6e5da8cbe2a53cd47545d607b606199be1b349c9928862c2c4f6772753/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a6972636f74652f737761676765722d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/zircote/swagger-php)[![Total Downloads](https://camo.githubusercontent.com/2afe22c8f1ef1afa1f6bf3bcbd1698a7c018f8c1f6e6d37854e5b765cea693ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a6972636f74652f737761676765722d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zircote/swagger-php)[![License](https://camo.githubusercontent.com/8b1aae4e936f349d6f8decdc91e35dacf277cce786deeca9364b210a029d2667/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4170616368652d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE-2.0.txt)

apidoc
======

[](#apidoc)

A sample way to generate [Swagger](http://swagger.io) documentation for your RESTful API using [doctrine annotations](http://doctrine-common.readthedocs.org/en/latest/reference/annotations.html).

Features
--------

[](#features)

- Compatible with the Swagger 2.0 specification
- Support multi-apps

Installation (with [Composer](https://getcomposer.org))
-------------------------------------------------------

[](#installation-with-composer)

1. Clone the code
2. Install vendors

```
composer install
```

3. Configure the host like this

```
vi /etc/hosts
# add IP VHOST
127.0.0.1 apidoc.local

```

4. Configure the virtual host for Apache

```

 ServerName apidoc.local
    DocumentRoot "/www/apidoc/public"

        # use mod_rewrite for pretty URL support
        RewriteEngine on
        # If a directory or a file exists, use the request directly
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        # Otherwise forward the request to index.php
        RewriteRule . index.php

        # use index.php as index file
        DirectoryIndex index.html index.php

```

Usage
-----

[](#usage)

Add annotations to your php files.

```
/**
 * @SWG\Info(title="My First API", version="0.1")
 */

/**
 * @SWG\Get(
 *     path="/api/resource.json",
 *     @SWG\Response(response="200", description="An example resource")
 * )
 */
```

See the Examples directory for more.

Configure
---------

[](#configure)

1. Open config/app.php
2. To Config the "app-list"
3. browse http://YOUR\_HOST/APP\_NAME, for example:

More on Swagger
---------------

[](#more-on-swagger)

-
-
-

Contributing
------------

[](#contributing)

Feel free to submit [Github Issues](https://github.com/davin.bao/apidoc/issues)or pull requests.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6d4bcfd83f5b742d5aeddbc12fdcd74806a7b79d770b613a707fe49bc74cd3d9?d=identicon)[davin-bao](/maintainers/davin-bao)

---

Top Contributors

[![davin-bao](https://avatars.githubusercontent.com/u/5162830?v=4)](https://github.com/davin-bao "davin-bao (1 commits)")

### Embed Badge

![Health badge](/badges/davinbao-apidoc/health.svg)

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

PHPackages © 2026

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