fitv/l5-swagger-ui is a Laravel package for swagger ui for laravel.
It currently has 0 GitHub stars and 79 downloads on Packagist (latest version 1.0.12).
Install it with composer require fitv/l5-swagger-ui.
Discover more Laravel packages by fitv
or browse all Laravel packages to compare alternatives.
Last updated
Swagger UI for Laravel (render YAML file).
composer require fitv/l5-swagger-ui
php artisan vendor:publish --provider "L5SwaggerUI\ServiceProvider"
<?php
return [
/*
* Title of the documentation page.
*/
'title' => 'Laravel Swagger UI',
/*
* Layout of the Swagger UI.
*/
'layout' => 'StandaloneLayout',
/*
* Route of the documentation page.
*/
'route' => '/api-docs',
/*
* Middleware allows to prevent unexpected access to the documentation page.
*/
'middleware' => [],
/*
* Path of the documentation files.
*/
'docs_path' => storage_path('docs'),
/*
* Filename of the json/yaml documentation.
*/
'doc_filename' => 'api.yml',
/*
* Path of the asset files.
*/
'assets_path' => '/vendor/l5-swagger-ui',
];
Open the API document URL in your browser
http://app.dev/api-docs
To improve access speed, you can merge multiple YAML files into one.
npm install swagger-merger -g
swagger-merger -i resources/docs/api.yml -o swagger.yml
Then change the doc_filename in the config file to swagger.yml.