2017 © Pedro Peláez
 

library swaggervel

A great way to integrate Swagger into Laravel

image

jlapp/swaggervel

A great way to integrate Swagger into Laravel

  • Monday, January 25, 2016
  • by slampenny
  • Repository
  • 17 Watchers
  • 450 Stars
  • 328,144 Installations
  • JavaScript
  • 4 Dependents
  • 0 Suggesters
  • 134 Forks
  • 38 Open issues
  • 3 Versions
  • 7 % Grown

The README.md

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., (*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, (*2)

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

Swaggervel

Swagger for Laravel, (*4)

This package combines Swagger-php and swagger-ui into one Laravel-friendly package., (*5)

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., (*6)

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

  • www.example.com/docs <- swagger JSON files are visible
  • www.example.com/api-docs <- swagger ui is visible.

Options

Uncomment the "viewHeaders" option in the Config file to add headers to your view., (*7)

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, (*8)

This package combines Swagger-php and swagger-ui into one Laravel-friendly package., (*9)

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., (*10)

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

  • www.example.com/docs <- swagger JSON files are visible
  • www.example.com/api-docs <- swagger ui is visible.

Options

Uncomment the "viewHeaders" option in the Config file to add headers to your view., (*11)

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., (*12)

The Versions

25/01 2016

dev-master

9999999-dev

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4

07/07 2015

1.0.x-dev

1.0.9999999.9999999-dev

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel swagger

21/04 2015

2.0.x-dev

2.0.9999999.9999999-dev

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4