2017 © Pedro Peláez
 

yii2-extension yii2-swagger

Yii 2 wrapper for Swagger

image

gbksoft/yii2-swagger

Yii 2 wrapper for Swagger

  • Wednesday, November 8, 2017
  • by gbksoft
  • Repository
  • 5 Watchers
  • 6 Stars
  • 3,841 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 2 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

Swagger Module for Yii 2

Installation

The preferred way to install this extension is through composer., (*1)

Either run, (*2)

php composer.phar require gbksoft/yii2-swagger

or add, (*3)

"gbksoft/yii2-swagger": "~1.0.0"

to the require section of your composer.json file., (*4)

Usage

...
    'modules' => [
        'swagger' => [
            'class' => 'gbksoft\modules\swagger\Module',
            'swaggerUrl' => '/api/web/swagger/swagger.json',
            'swaggerPath' => __DIR__ . '/../../api/web/swagger/swagger.json',
            'on beforeJson' => function($event) {
                // Replace response content (swagger.json)
                $event->responseText = mb_ereg_replace('{{http_host}}', \Yii::$app->request->hostInfo, $event->responseText);
                $event->responseText = mb_ereg_replace('{{apiversion}}', \Yii::$app->params['apiversion'], $event->responseText);
            },
        ],
    ],
...

Module url rules

swagger/                <== Main swagger page
swagger/default/json    <== Get swagger.json file with replacements
swagger/default/history <== Get git logs history (included in bottom on main swagger page)

The Versions

08/11 2017

dev-master

9999999-dev

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 swagger module

08/11 2017

1.2.0

1.2.0.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 swagger module

08/08 2016

1.1.0

1.1.0.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

The Development Requires

extension yii2 swagger module

06/04 2016

1.0.4

1.0.4.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

by Hryhorii Furletov

extension yii2 swagger module

22/03 2016

1.0.3

1.0.3.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

by Hryhorii Furletov

extension yii2 swagger module

09/02 2016

1.0.2

1.0.2.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

by Hryhorii Furletov

extension yii2 swagger module

09/02 2016

1.0.1

1.0.1.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

by Hryhorii Furletov

extension yii2 swagger module

03/02 2016

1.0.0

1.0.0.0

Yii 2 wrapper for Swagger

  Sources   Download

MIT

The Requires

 

by Hryhorii Furletov

extension yii2 swagger module