定制 kbrabrand/silex-swagger-ui 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

kbrabrand/silex-swagger-ui

Composer 安装命令:

composer require kbrabrand/silex-swagger-ui

包简介

A silex service provider that integrates the Swagger UI documentation browser into silex

README 文档

README

A silex service provider that integrates the Swagger UI documentation browser into silex. Does not depend on anything besides Silex.

Installation

Add "kbrabrand/silex-swagger-ui": "dev-master" to you composer.json file and run composer install inside the root of your project.

In addition to this you will need to register the service in your Silex app like this;

// Set up swagger ui service for viewing the swagger docs
$app->register(new SwaggerUI\Silex\Provider\SwaggerUIServiceProvider(), array(
    'swaggerui.path'       => '/v1/swagger',
    'swaggerui.apiDocPath' => '/v1/docs'
));

This will result in the SwaggerUI interface being available at /v1/swagger under you Silex application root. The swaggerui.apiDovPath config option specifies the URL/path to the swagger doc files.

Known issues

The Swagger UI is pretty slow right now due to the fact that static resources are served through a Silex controller and no cache is in place (yet). I'll try to fix this soon.

License

Copyright (c) 2014, Kristoffer Brabrand kristoffer@brabrand.no

Licensed under the MIT License

统计信息

  • 总下载量: 13.45k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 2
  • Forks: 10
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-07-01