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

ActiveLibrary[API Development](/categories/api)

wolfpack-it/yii2-swagger
========================

Swagger for Yii2, extension of light/yii2-swagger.

v1.0.0(6y ago)08512[1 PRs](https://github.com/wolfpack-it/yii2-swagger/pulls)MITPHPPHP &gt;=7.1.0

Since Apr 22Pushed 2y ago4 watchersCompare

[ Source](https://github.com/wolfpack-it/yii2-swagger)[ Packagist](https://packagist.org/packages/wolfpack-it/yii2-swagger)[ RSS](/packages/wolfpack-it-yii2-swagger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Swagger for Yii2, extension of light/yii2-swagger
=================================================

[](#swagger-for-yii2-extension-of-lightyii2-swagger)

This extension provides [Swagger](https://swagger.io/) actions for the Yii2 Framework.

It is an extension of [light/yii2-swagger](https://packagist.org/packages/light/yii2-swagger).

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
$ composer require wolfpack-it/yii2-swagger
```

or add

```
"wolfpack-it/yii2-swagger": "^"

```

to the `require` section of your `composer.json` file.

If Swagger PHP version 3 or higher is desired, also install:

```
"zircote/swagger-php": " as 2.0.0",
```

Usage
-----

[](#usage)

Use the package by extending the `\WolfpackIT\swagger\controllers\SwaggerController` in the application where you need it. Override the init function to set the scan directories:

```
public function init()
{
    $this->scanDirs = [
         \Yii::getAlias('@api/models'),
         \Yii::getAlias('@api/controllers'),
    ];
    parent::init;
}
```

You need to add the following to the application params:

```
    'swagger' => [
        'oAuthConfiguration' => [
            'baseUrl' => 'https://example.com/oauth/', // must end with a / (forward slash)
            'securityScheme' => 'exampleSecurity', // will be used to auto login
            'username' => 'info@example.nl', // will be used to auto login
            'password' => 'example', // will be used to auto login
            'clientId' => 'example-client', // will be used to auto login
            'clientSecret' => 'example', // will be used to auto login
        ]
    ]
```

It is advised to only use the auto login functionality when the application is not in production!

If you need more granular control, look at how the actions are configured in `\WolfpackIT\swagger\controllers\SwaggerController`.

The rest of the documentation can be found at [light/yii2-swagger](https://packagist.org/packages/light/yii2-swagger).

Credits
-------

[](#credits)

- [Joey Claessen](https://github.com/joester89)
- [Wolfpack IT](https://github.com/wolfpack-it)

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/wolfpack-it/yii2-swagger/blob/master/LICENSE) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2218d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/609e8d7caaa1dacc8b03bcc8347b5732e5a91399bb843e5b44fec66be256f35a?d=identicon)[pascalvgemert](/maintainers/pascalvgemert)

![](https://www.gravatar.com/avatar/88359ebe0456645a614e563dfbf0dd025b69ef57221050cb9eb31e3eef4dd0f9?d=identicon)[joester89](/maintainers/joester89)

![](https://www.gravatar.com/avatar/50236d89a220d6eda49f2a6c5a66779f084660c2596ef2c40225b89c4f276efb?d=identicon)[Kavantix](/maintainers/Kavantix)

---

Top Contributors

[![joester89](https://avatars.githubusercontent.com/u/9624366?v=4)](https://github.com/joester89 "joester89 (6 commits)")

### Embed Badge

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

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

###  Alternatives

[dotzero/yii2-amocrm

Расширение для Yii Framework 2 реализующее клиент для работы с API amoCRM

1639.7k](/packages/dotzero-yii2-amocrm)[conquer/services

Yii2 soap wsdl web services

1632.5k](/packages/conquer-services)[skeeks/yii2-google-api

Component for work with google api based on google/apiclient

1243.1k1](/packages/skeeks-yii2-google-api)[apexwire/yii2-restclient

Tools to use API as ActiveRecord for Yii2

143.5k](/packages/apexwire-yii2-restclient)

PHPackages © 2026

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