Git Product home page Git Product logo

swaggervel's Introduction

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.

Installation

  • Execute composer require m4r14/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)

Options

All options are well commented within the swaggervel.php config file.

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.

Further Notes

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

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.

swaggervel's People

Contributors

bastien-phi avatar cliveza avatar drmonkeyninja avatar fgreinus avatar jamisonkirk avatar jbrooksuk avatar k911 avatar kevin91nl avatar lahaxearnaud avatar m4r14 avatar mitulgolakiya avatar phazei avatar riemers avatar sano000 avatar slampenny avatar temasm avatar thmsu avatar tralves avatar urossimovic avatar vishalinfyom avatar w0rd-driven avatar xaockd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.