From f32abd94fde5e81db76e4dfd9ca2e88c5fd98cd5 Mon Sep 17 00:00:00 2001 From: Lucas GOSGNACH Date: Fri, 21 Feb 2025 11:55:04 +0100 Subject: [PATCH 1/6] Detailed configuration documentation --- content/4.digging-deeper/8.documentation.md | 32 +++++++-------------- 1 file changed, 11 insertions(+), 21 deletions(-) diff --git a/content/4.digging-deeper/8.documentation.md b/content/4.digging-deeper/8.documentation.md index fb6af18..5957ecb 100644 --- a/content/4.digging-deeper/8.documentation.md +++ b/content/4.digging-deeper/8.documentation.md @@ -22,14 +22,14 @@ By default, the generated documentation will be accessible via `/api-documentati To achieve this, you need to be familiar with OpenApi. If you aren't, please consult the [documentation](https://spec.openapis.org/oas/v3.1.0) -You can to configure OpenApi information, servers and security in the configuration: +You can to configure OpenApi information, servers and security in the configuration on `config/rest.php`: ```php [ - /* + /* |-------------------------------------------------------------------------- | Rest Documentation |-------------------------------------------------------------------------- - | + |f | This is the feature that automatically generates your API documentation for you. | Laravel Rest Api will validate each searched / mutated / deleted model to avoid leaks in your API. | This feature is based on OpenApi, for more details see: https://swagger.io/specification/ @@ -137,25 +137,15 @@ First you'll need to generate a dedicated `RestDocumentationServiceProvider` cla php artisan rest:documentation-provider ``` -Then add the freshly generated service provider to your providers in your `config/app.php` file: +Then add the freshly generated service provider to your providers in your `bootstrap/providers.php` file: ```php -[ - /* - |-------------------------------------------------------------------------- - | Autoloaded Service Providers - |-------------------------------------------------------------------------- - | - | The service providers listed here will be automatically loaded on the - | request to your application. Feel free to add your own services to - | this array to grant expanded functionality to your applications. - | - */ - - 'providers' => [ - // ... - \App\Providers\RestDocumentationServiceProvider::class - ] -] + return [ + App\Providers\AppServiceProvider::class, + App\Providers\AuthServiceProvider::class, + App\Providers\HorizonServiceProvider::class, + App\Providers\TelescopeServiceProvider::class, + App\Providers\RestDocumentationServiceProvider::class + ]; ``` You are then free to declare your own routes in your freshly generated service provider: From f7f664065ab588c9dcf56f847e249e66005692d2 Mon Sep 17 00:00:00 2001 From: Lucas GOSGNACH Date: Fri, 28 Feb 2025 08:26:22 +0100 Subject: [PATCH 2/6] Detailed configuration documentation --- content/4.digging-deeper/8.documentation.md | 2 +- content/4.digging-deeper/composer.json | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 content/4.digging-deeper/composer.json diff --git a/content/4.digging-deeper/8.documentation.md b/content/4.digging-deeper/8.documentation.md index 5957ecb..4b3f635 100644 --- a/content/4.digging-deeper/8.documentation.md +++ b/content/4.digging-deeper/8.documentation.md @@ -29,7 +29,7 @@ You can to configure OpenApi information, servers and security in the configurat |-------------------------------------------------------------------------- | Rest Documentation |-------------------------------------------------------------------------- - |f + | | This is the feature that automatically generates your API documentation for you. | Laravel Rest Api will validate each searched / mutated / deleted model to avoid leaks in your API. | This feature is based on OpenApi, for more details see: https://swagger.io/specification/ diff --git a/content/4.digging-deeper/composer.json b/content/4.digging-deeper/composer.json new file mode 100644 index 0000000..a9e0d52 --- /dev/null +++ b/content/4.digging-deeper/composer.json @@ -0,0 +1,14 @@ +{ + "name": "vendor_name/4.digging-deeper", + "description": "description", + "minimum-stability": "stable", + "license": "proprietary", + "authors": [ + { + "name": "lgh.adm", + "email": "email@example.com" + } + ], + "require": { + } +} \ No newline at end of file From ea68f06f7df6b20049ced4ebec4293daf874c56d Mon Sep 17 00:00:00 2001 From: Lucas GOSGNACH Date: Fri, 28 Feb 2025 08:26:22 +0100 Subject: [PATCH 3/6] Detailed configuration documentation --- content/4.digging-deeper/8.documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/4.digging-deeper/8.documentation.md b/content/4.digging-deeper/8.documentation.md index 5957ecb..4b3f635 100644 --- a/content/4.digging-deeper/8.documentation.md +++ b/content/4.digging-deeper/8.documentation.md @@ -29,7 +29,7 @@ You can to configure OpenApi information, servers and security in the configurat |-------------------------------------------------------------------------- | Rest Documentation |-------------------------------------------------------------------------- - |f + | | This is the feature that automatically generates your API documentation for you. | Laravel Rest Api will validate each searched / mutated / deleted model to avoid leaks in your API. | This feature is based on OpenApi, for more details see: https://swagger.io/specification/ From 1185652a0ef0a6d915b34d934307844c0da99234 Mon Sep 17 00:00:00 2001 From: Lucas GOSGNACH Date: Fri, 28 Feb 2025 08:32:59 +0100 Subject: [PATCH 4/6] Detailed configuration documentation --- content/4.digging-deeper/composer.json | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 content/4.digging-deeper/composer.json diff --git a/content/4.digging-deeper/composer.json b/content/4.digging-deeper/composer.json deleted file mode 100644 index a9e0d52..0000000 --- a/content/4.digging-deeper/composer.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "vendor_name/4.digging-deeper", - "description": "description", - "minimum-stability": "stable", - "license": "proprietary", - "authors": [ - { - "name": "lgh.adm", - "email": "email@example.com" - } - ], - "require": { - } -} \ No newline at end of file From 70afad260b5fa5ff457f6623a8bd30f45ed05eaf Mon Sep 17 00:00:00 2001 From: Gautier DELEGLISE Date: Fri, 28 Mar 2025 07:58:07 +0100 Subject: [PATCH 5/6] Update 8.documentation.md --- content/4.digging-deeper/8.documentation.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/content/4.digging-deeper/8.documentation.md b/content/4.digging-deeper/8.documentation.md index 4b3f635..ffc4838 100644 --- a/content/4.digging-deeper/8.documentation.md +++ b/content/4.digging-deeper/8.documentation.md @@ -140,10 +140,7 @@ php artisan rest:documentation-provider Then add the freshly generated service provider to your providers in your `bootstrap/providers.php` file: ```php return [ - App\Providers\AppServiceProvider::class, - App\Providers\AuthServiceProvider::class, - App\Providers\HorizonServiceProvider::class, - App\Providers\TelescopeServiceProvider::class, + // ... App\Providers\RestDocumentationServiceProvider::class ]; ``` From ecd42cce6995f4362ab434df1c672ddea74f0975 Mon Sep 17 00:00:00 2001 From: Gautier DELEGLISE Date: Fri, 28 Mar 2025 07:58:56 +0100 Subject: [PATCH 6/6] Update 8.documentation.md --- content/4.digging-deeper/8.documentation.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/4.digging-deeper/8.documentation.md b/content/4.digging-deeper/8.documentation.md index ffc4838..80ea5b0 100644 --- a/content/4.digging-deeper/8.documentation.md +++ b/content/4.digging-deeper/8.documentation.md @@ -22,7 +22,7 @@ By default, the generated documentation will be accessible via `/api-documentati To achieve this, you need to be familiar with OpenApi. If you aren't, please consult the [documentation](https://spec.openapis.org/oas/v3.1.0) -You can to configure OpenApi information, servers and security in the configuration on `config/rest.php`: +You can to configure OpenApi information, servers and security in your configuration file `config/rest.php`: ```php [ /*