tanghengzhi/yii2-swagger

0.0.3 2019-03-06 09:33 UTC

This package is auto-updated.

Last update: 2024-06-06 23:40:59 UTC


README

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

composer require tanghengzhi/yii2-swagger --dev

2. Add following lines to config/web.php

  //config/web.php
  
  $config = [
      ...
      'modules' => [
        'swagger' => [
            'class' => 'tanghengzhi\swagger\Module',
        ],
      ],
      ...
  ]

3. Add following lines to config/params.php

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