diff --git a/content/4.digging-deeper/8.documentation.md b/content/4.digging-deeper/8.documentation.md index fb6af18..80ea5b0 100644 --- a/content/4.digging-deeper/8.documentation.md +++ b/content/4.digging-deeper/8.documentation.md @@ -22,10 +22,10 @@ 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 your configuration file `config/rest.php`: ```php [ - /* + /* |-------------------------------------------------------------------------- | Rest Documentation |-------------------------------------------------------------------------- @@ -137,25 +137,12 @@ 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' => [ + return [ // ... - \App\Providers\RestDocumentationServiceProvider::class - ] -] + App\Providers\RestDocumentationServiceProvider::class + ]; ``` You are then free to declare your own routes in your freshly generated service provider: