PHPackages                             tanghengzhi/yii2-swagger - 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. tanghengzhi/yii2-swagger

ActiveLibrary[API Development](/categories/api)

tanghengzhi/yii2-swagger
========================

yii2 swagger3.0

0.0.3(7y ago)055MITPHPPHP &gt;=7.0

Since Dec 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/tanghengzhi/yii2-swagger)[ Packagist](https://packagist.org/packages/tanghengzhi/yii2-swagger)[ RSS](/packages/tanghengzhi-yii2-swagger/feed)WikiDiscussions master Synced 2w ago

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

Yii2 Swagger Extension
======================

[](#yii2-swagger-extension)

First of all, please make sure you have some basic concepts of Swagger OpenAPI and Swagger UI.

Then you can start with following steps:

1. Install `tanghengzhi/yii2-swagger` extension
===============================================

[](#1-install-tanghengzhiyii2-swagger-extension)

```
composer require tanghengzhi/yii2-swagger --dev

```

2. Add following lines to `config/web.php`
==========================================

[](#2-add-following-lines-to-configwebphp)

```
  //config/web.php

  $config = [
      ...
      'modules' => [
        'swagger' => [
            'class' => 'tanghengzhi\swagger\Module',
        ],
      ],
      ...
  ]
```

3. Add following lines to `config/params.php`
=============================================

[](#3-add-following-lines-to-configparamsphp)

```
    'swagger'=>[
        'scan_dir'=>[
            'app/controllers',
        ]
    ]
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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.

###  Release Activity

Cadence

Every ~45 days

Total

3

Last Release

2674d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2969338?v=4)[Victor Tang](/maintainers/tanghengzhi)[@tanghengzhi](https://github.com/tanghengzhi)

---

Top Contributors

[![tanghengzhi](https://avatars.githubusercontent.com/u/2969338?v=4)](https://github.com/tanghengzhi "tanghengzhi (1 commits)")

### Embed Badge

![Health badge](/badges/tanghengzhi-yii2-swagger/health.svg)

```
[![Health](https://phpackages.com/badges/tanghengzhi-yii2-swagger/health.svg)](https://phpackages.com/packages/tanghengzhi-yii2-swagger)
```

###  Alternatives

[darkaonline/l5-swagger

OpenApi or Swagger integration to Laravel

3.0k37.6M127](/packages/darkaonline-l5-swagger)[nelmio/api-doc-bundle

Generates documentation for your REST API from attributes

2.4k67.4M257](/packages/nelmio-api-doc-bundle)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[darkaonline/swagger-lume

OpenApi or Swagger integration to Lumen

3362.4M3](/packages/darkaonline-swagger-lume)[jlapp/swaggervel

A great way to integrate Swagger into Laravel

490950.3k2](/packages/jlapp-swaggervel)[light/yii2-swagger

swagger intergation with yii2

153850.4k4](/packages/light-yii2-swagger)

PHPackages © 2026

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