rayo / laravel-swagger
A simple swagger integration with laravel
dev-master
2023-02-21 01:06 UTC
Requires
- php: ^8.0
- laravel/framework: ^9.0
- swagger-api/swagger-ui: ^3.0
Requires (Dev)
- orchestra/testbench: ^6.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-04-21 03:54:23 UTC
README
A simple swagger integration with laravel
Installation
Require the package using composer:
composer require rayo/laravel-swagger
Publish the config file and view files using the following command:
php artisan vendor:publish --provider="Rayo\LaravelSwagger\SwaggerServiceProvider"
It will publish the config file swagger.php
and the view file index.blade.php
in the resources/views/vendor/laravel-swagger
directory.
Usage
Drop your swagger json or yaml file in the storage/api-docs
directory and update the config/swagger.php
file with the file name.
return [ 'docs_yaml' => 'api-docs.yaml', 'docs_json' => 'api-docs.json', ];