https://github.com/paunin/laswagger
This package is a wrapper for Swagger-php and makes it easy to integrate with Lumen/Larvarel
https://github.com/paunin/laswagger
laravel lumen swagger swagger-codegen swagger-php
Last synced: 7 months ago
JSON representation
This package is a wrapper for Swagger-php and makes it easy to integrate with Lumen/Larvarel
- Host: GitHub
- URL: https://github.com/paunin/laswagger
- Owner: paunin
- Created: 2017-02-03T13:31:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-02-04T03:28:31.000Z (about 9 years ago)
- Last Synced: 2025-08-12T21:23:10.268Z (7 months ago)
- Topics: laravel, lumen, swagger, swagger-codegen, swagger-php
- Language: PHP
- Homepage:
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# paunin/laswagger
This package is a wrapper for [Swagger-php](https://github.com/zircote/swagger-php) and makes it easy to integrate with Lumen/Larvarel.
## Usage
### Installation
Via Composer
Add information about new package in your `composer.json`
```json
"require": {
...
"paunin/laswagger": ">=1.0.0"
...
}
```
After the composer install finishes, register the service provider:
* Lumen Application:
```php
$app->register(Laswagger\Providers\LumeSwaggerServiceProvider::class);
```
* Laravel Application: not supports yet.
Now you can wo with laswagger:
* Run `php artisan swagger:generate file_name [base_host]`: to generate swagger api docs.
* Go to `/swagger/api-docs` (default routing config) to see swagger api docs in JSON format
### Default configuration
```php
[
'prefix' => 'swagger',
'cors' => false
],
'api' => [
'directories' => [base_path('app')],
'excludes' => [],
'host' => null
]
];
```
### Customize configuration
In order to change default config you can copy the configuration template in `config/laswagger.php` to your application's `config` directory and modify according to your needs.
For more information see the [Configuration Files](http://lumen.laravel.com/docs/configuration#configuration-files) section in the Lumen documentation.
## Tests
```sh
./vendor/phpunit/phpunit/phpunit
```
See test result at `./build`