• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

slampenny/Swaggervel: Swagger for Laravel

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

slampenny/Swaggervel

开源软件地址(OpenSource Url):

https://github.com/slampenny/Swaggervel

开源编程语言(OpenSource Language):

JavaScript 95.8%

开源软件介绍(OpenSource Introduction):

Swagger 2

This branch uses Swagger-spec 2.0 and Swagger-php 2.0. This branch also updates the Swagger-ui to version 2.1.1.

OAuth2

The Swagger-ui was changed to allow inserting the OAuth 2 parameters (client_id, client_secret, realm and appName) directly in the ui. You can also pass these values in the url in the URL, like so: http://api.appcursos.com/api-docs?client_id=my-client-id&client_secret=my-client-secret&realm=my-realm&appName=my-app-name

To use Swaggervel for Laravel 4.2, use the version 1.0 branch (https://github.com/slampenny/Swaggervel/tree/1.0)

Swaggervel

Swagger for Laravel

This package combines Swagger-php and swagger-ui into one Laravel-friendly package.

When you run your app in debug mode, Swaggervel will scan your app folder (or any folder that is set under the "app-dir" variable in the packages config), generate swagger json files and deposit them to the doc-dir folder (default is /docs). Files are then served by swagger-ui under the api-docs director.

Installation

  • Add Jlapp\Swaggervel\SwaggervelServiceProvider to your providers array in app/config/app.php above your route provider, to avoid any catch-all routes
  • Run php artisan vendor:publish to push swagger-ui to your public folder.

Example

Options

Uncomment the "viewHeaders" option in the Config file to add headers to your view.

How to Use Swagger-php

The actual Swagger spec is beyond the scope of this package. All Swaggervel does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php look here. For good examples of swagger-php in action look here.

For Laravel 5, please use the 2.0 branch!

For Laravel 4, please use the 1.0 branch!

Swaggervel

Swagger for Laravel

This package combines Swagger-php and swagger-ui into one Laravel-friendly package.

When you run your app in debug mode, Swaggervel will scan your app folder (or any folder that is set under the "app-dir" variable in the packages config), generate swagger json files and deposit them to the doc-dir folder (default is /docs). Files are then served by swagger-ui under the api-docs director.

Installation

  • Add Jlapp\Swaggervel\SwaggervelServiceProvider to your providers array in app/config/app.php above your routes provider (to avoid catch all routes)
  • Run php artisan vendor:publish to push config files to your app folder.

Example

Options

Uncomment the "viewHeaders" option in the Config file to add headers to your view.

How to Use Swagger-php

The actual Swagger spec is beyond the scope of this package. All Swaggervel does is package up swagger-php and swagger-ui in a Laravel-friendly fashion, and tries to make it easy to serve. For info on how to use swagger-php look here. For good examples of swagger-php in action look here.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap