2017 © Pedro Peláez
 

library swaggervel

A great way to integrate Swagger into Laravel

image

ahmedash95/swaggervel

A great way to integrate Swagger into Laravel

  • Monday, December 4, 2017
  • by ahmedash95
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 134 Forks
  • 0 Open issues
  • 18 Versions
  • 0 % Grown

The README.md

Swaggervel (Swagger integration for Laravel 5)

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

Installation

  • Execute composer require appointer/swaggervel --dev within your laravel root directory
  • Add Appointer\Swaggervel\SwaggervelServiceProvider::class to your providers array in app/config/app.php above your route provider, to avoid any catch-all routes
  • Run php artisan vendor:publish --tag=public to push swagger-ui to your public folder (can be found in public/vendor/swaggervel).
  • Optionally run php artisan vendor:publish --tag=config to push the swaggervel default config into your application's config directory.
  • Optionally run php artisan vendor:publish --tag=views to push the swaggervel index view file into resources/views/vendor/swaggervel.

Examples (when using the default configuration)

  • www.example.com/docs <- You may find your automatically generated Swagger .json-File there
  • www.example.com/api/docs <- Access to your Swagger UI

Options

All options are well commented within the swaggervel.php config file., (*2)

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

Further Notes

This package is a fork of slampenny/Swaggervel, as it is no longer maintained., (*4)

TODO

  • the handling of the /doc call is still really inconsistent, as you cannot change the file name (api-docs.json), but are able to change the file you acces when using the /doc route.

The Versions

04/12 2017

dev-master

9999999-dev

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

04/12 2017

2.2.1

2.2.1.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

04/12 2017

dev-ahmedash95-patch-1

dev-ahmedash95-patch-1

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

12/10 2017

v2.2

2.2.0.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

25/09 2017

v2.1.1

2.1.1.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

26/08 2017

v2.1

2.1.0.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

23/05 2017

v2.0.2

2.0.2.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

16/04 2017

v2.0.1

2.0.1.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

20/03 2017

v2.0.0

2.0.0.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

09/02 2017

v1.2.2

1.2.2.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

03/02 2017

v1.2.1

1.2.1.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

28/01 2017

v1.2

1.2.0.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger

27/01 2017

v1.1.0

1.1.0.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4

24/01 2017

v1.0.4

1.0.4.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4

24/01 2017

v1.0.3

1.0.3.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4

23/01 2017

v1.0.2

1.0.2.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4

22/01 2017

v1.0.1

1.0.1.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4

21/01 2017

v1.0

1.0.0.0

A great way to integrate Swagger into Laravel

  Sources   Download

MIT

The Requires

 

by jlapp

laravel api documentation swagger l5 l4