swagger deployed at /swagger

This commit is contained in:
Clément
2025-06-10 21:17:33 +02:00
parent 6e2fdb5087
commit b0765e8aac
87 changed files with 594 additions and 2 deletions

0
laravel/config/app.php Normal file → Executable file
View File

0
laravel/config/auth.php Normal file → Executable file
View File

0
laravel/config/cache.php Normal file → Executable file
View File

0
laravel/config/database.php Normal file → Executable file
View File

0
laravel/config/filesystems.php Normal file → Executable file
View File

0
laravel/config/logging.php Normal file → Executable file
View File

0
laravel/config/mail.php Normal file → Executable file
View File

0
laravel/config/queue.php Normal file → Executable file
View File

0
laravel/config/sanctum.php Normal file → Executable file
View File

0
laravel/config/services.php Normal file → Executable file
View File

0
laravel/config/session.php Normal file → Executable file
View File

72
laravel/config/swagger-ui.php Executable file
View File

@@ -0,0 +1,72 @@
<?php
use Wotz\SwaggerUi\Http\Middleware\EnsureUserIsAuthorized;
return [
'files' => [
[
/*
* The path where the swagger file is served.
*/
'path' => 'swagger',
/*
* The title of the page where the swagger file is served.
*/
'title' => env('APP_NAME') . ' - Swagger',
/*
* The versions of the swagger file. The key is the version name and the value is the path to the file.
*/
'versions' => [
'v1' => resource_path('/swagger/openapi.json'),
],
/*
* The default version that is loaded when the route is accessed.
*/
'default' => 'v1',
/*
* The middleware that is applied to the route.
*/
'middleware' => [
'web',
EnsureUserIsAuthorized::class,
],
/*
* Specify the validator URL. Set to false to disable validation.
*/
'validator_url' => false,
/*
* If enabled the file will be modified to set the server url and oauth urls.
*/
'modify_file' => true,
/*
* The server URL configuration for the swagger file.
*/
'server_url' => env('APP_URL'),
/*
* The oauth configuration for the swagger file.
*/
'oauth' => [
'token_path' => 'oauth/token',
'refresh_path' => 'oauth/token',
'authorization_path' => 'oauth/authorize',
'client_id' => env('SWAGGER_UI_OAUTH_CLIENT_ID'),
'client_secret' => env('SWAGGER_UI_OAUTH_CLIENT_SECRET'),
],
/*
* Path to a custom stylesheet file if you want to customize the look and feel of swagger-ui.
* The content of the file will be read and added into a style-tag on the swagger-ui page.
*/
'stylesheet' => null,
],
],
];