2017 © Pedro Peláez
 

library swaggeravel

This package allows you to: generate RESTful API document using Swagger PHP.

image

weburnit/swaggeravel

This package allows you to: generate RESTful API document using Swagger PHP.

  • Wednesday, July 12, 2017
  • by weburnit
  • Repository
  • 1 Watchers
  • 0 Stars
  • 18 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Swagger/LaraSwagger

Software License

This package is a wrapper of Swagger-php and makes it easy to integrate with Lumen/Larvarel., (*1)

Usage

Installation

Via Composer, (*2)

Add information about new package in your composer.json, (*3)

    "repositories": [
        {
          "type": "vcs",
          "url": "git@gitlab.lzd.co:operations/laraswagger.git",
          "name": "lazada/database-minifier"
        }
    ],
    "require": {
        "lazada/laraswagger": ">=1.0.0"
    }

After the composer install finishes, register the service provider:, (*4)

  • Lumen Application:
$app->register(Swagger\LaraSwagger\Providers\LumeSwaggerServiceProvider::class);
  • Laravel Application: not supports yet.

Now you can rock with LaraSwagger: * Run php artisan swagger:generate file_name [base_host]: to generate swagger api docs., (*5)

  • Go to /swagger/api-docs (default routing config) to see swagger api docs in JSON format

Default configuration

<?php
return [
    'routes' => [
        'prefix' => 'swagger'
    ],
    'api' => [
        'directories' => [base_path('app')],
        'excludes' => [],
        'host' => null
    ]
];

Customize configuration

In order to change default config you can copy the configuration template in config/lara-swagger.php to your application's config directory and modify according to your needs. For more information see the Configuration Files section in the Lumen documentation., (*6)

Tests

./vendor/phpunit/phpunit/phpunit

See test result at ./build, (*7)

The Versions

12/07 2017
11/07 2017

0.2

0.2.0.0 https://github.com/weburnit/swaggeravel

This package allows you to: generate RESTful API document using Swagger PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires

11/07 2017

0.1

0.1.0.0 https://github.com/weburnit/swaggeravel

This package allows you to: generate RESTful API document using Swagger PHP.

  Sources   Download

MIT

The Requires

 

The Development Requires