2017 © Pedro Peláez
 

library l5-swagger

Swagger integration for Laravel 5.2+

image

lithiumdev/l5-swagger

Swagger integration for Laravel 5.2+

  • Tuesday, March 8, 2016
  • by tsiedsma
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2,005 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 26 % Grown

The README.md

, (*1)

L5-Swagger

from Lithium Hosting
We're always open to pull requests, feel free to make this your own or help us make it better., (*2)

(c) Lithium Hosting, llc, (*3)

License

This library is licensed under the MIT license; you can find a full copy of the license itself in the file /LICENSE
Inspired by Jordan Lapp's Swaggervel!, (*4)

Requirements

  • PHP 5.5.9 or newer
  • Laravel 5.2

Description

This package combines Swagger-php and swagger-ui into one Laravel-friendly package.
When you run your app in debug mode, L5-Swagger 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 directory., (*5)

Installation

Installation is easy, just add "lithiumdev/l5-swagger": "~1.0" to your composer.json and then run composer update
You can also just type composer require lithiumdev/l5-swagger:~1.0., (*6)

After the composer install finishes, register the service provider and publish the assets:, (*7)

  • Add LithiumDev\Swagger\SwaggerServiceProvider::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 --provider="LithiumDev\Swagger\SwaggerServiceProvider" to publish required resources.

Usage

Two routes are available, one serves the swagger JSON file and the other displays Swagger-UI, (*8)

  • www.example.com/docs - This is the swagger JSON route
  • www.example.com/api/docs - This route serves up the Swagger-UI

You can manaully generate the swagger json file by running the following command:
./vendor/bin/swagger app/ -o storage/docs/api-docs.json, (*9)

More to come..., (*10)

The Versions

08/03 2016

dev-master

9999999-dev

Swagger integration for Laravel 5.2+

  Sources   Download

MIT

The Requires

 

by Troy Siedsma

laravel swagger api documenter

08/03 2016

1.0.0

1.0.0.0

Swagger integration for Laravel 5.2+

  Sources   Download

MIT

The Requires

 

by Troy Siedsma

laravel swagger api documenter