Download the PHP package zquintana/lara-swag without Composer
On this page you can find all versions of the php package zquintana/lara-swag. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zquintana/lara-swag
More information about zquintana/lara-swag
Files in zquintana/lara-swag
Package lara-swag
Short Description Generates documentation for your REST API from annotations
License MIT
Informations about the package lara-swag
Lara Swag
The LaraSwag package allows you to generate a decent documentation for your APIs.
Installation
First, open a command console, enter your project directory and execute the following command to download the latest version of this bundle (still in beta, for a stable version look here):
Then add the service provider to your app config:
To install the vendor assets like configurations and templates run:
To browse your documentation with Swagger UI, register the routes in config/routing/lara_swag.php
.
To make this easier after you run the vendor:publish
command you can add
the following to your routes config file:
What does this bundle?
It generates you a swagger documentation from your Laravel app thanks to Describers. Each of these Describers extract infos from various sources. For instance, one extract data from SwaggerPHP annotations, one from your routes, etc.
If you configured the routes above, you can browse your documentation at
http://example.org/api/docs
.
Use the bundle
You can configure globally your documentation in the config (take a look at the Swagger specification to know the fields available):
To document your routes, you can use annotations in your controllers:
What's supported?
This package supports Laravel route requirements, PHP annotations, Swagger-Php annotations.
It supports models through the @Model
annotation.
Contributing
See CONTRIBUTING file.
Running the Tests
Install the Composer dependencies:
git clone https://github.com/zquintana/LaraSwag.git
cd LaraSwag
composer install
Then run the test suite:
./phpunit
License
This bundle is released under the MIT license.
All versions of lara-swag with dependencies
symfony/property-info Version ^3.1|^4.0
exsyst/swagger Version ~0.2.3
zircote/swagger-php Version ^2.0.9
indigophp/doctrine-annotation-autoload Version ^0.1