aymard-pro/cake-swagger
Composer 安装命令:
composer require aymard-pro/cake-swagger
包简介
Swagger plugin for CakePHP v3
README 文档
README
CakePHP 3.x plugin that dinamically adds auto-generated Swagger documentation to your projects using swagger-php and swagger-ui 3.x
Requirements
- CakePHP 3.0+
- Some swagger-php annotation knowledge
Installation
-
Install the plugin using composer:
composer require aymard-pro/cake-swagger:dev-master
-
To enable the plugin either run the following command:
bin/cake plugin load CakeSwagger --routes --bootstrap
or manually add the following line to your
config/bootstrap.phpfile:Plugin::load('CakeSwagger', ['routes' => true, 'bootstrap' => true]);
-
Create the configuration file
/config/cake-swagger.phpif not exists. See #Configuration section -
Browsing to
http://your_app_uri/api/uishould now produce the Swagger-UI interface:
Configuration
All configuration for this plugin is done through the /config/cake-swagger.php
configuration file. Full example below.
<?php return [ 'CakeSwagger' => [ 'ui' => [ 'title' => 'CakePHP Swagger plugin' ], 'route' => [ 'path' => '/api' ], 'directory' => [], 'exclude' => [] ] ];
Additional Reading
Contribute
I'm trying to make this plugin very testable for the community. Your ideas and suggestions are welcome. Create an issue here.
NB
This plugin was originally forked from alt3/cakephp-swagger based on the Swagger-UI 2.2.3
统计信息
- 总下载量: 21.72k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-04-16