Skip to content

Commit

Permalink
fix: service controller references for "api_doc" route (#2119)
Browse files Browse the repository at this point in the history
* fix: Symfony service controller reference for "api_doc" route

* fix: laravel service controller reference for "api_doc" route

---------

Co-authored-by: Vincent Amstoutz <[email protected]>
  • Loading branch information
phansys and vinceAmstoutz authored Jan 8, 2025
1 parent af10348 commit bfe32af
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ Manually register the Swagger UI controller:
# app/config/routes.yaml
api_doc:
path: /api_documentation
controller: api_platform.swagger_ui.processor
controller: api_platform.action.documentation
```
Change `/api_documentation` to the URI you wish Swagger UI to be accessible on.
Expand All @@ -649,9 +649,9 @@ Manually register the Swagger UI controller:
```php
// routes/web.php
use Illuminate\Support\Facades\Route;
use ApiPlatform\Laravel\State\SwaggerUiProcessor;
use ApiPlatform\Laravel\Controller\DocumentationController;
Route::post('/api_documentation', SwaggerUiProcessor::class)
Route::post('/api_documentation', DocumentationController::class)
->name('api_doc');
```

Expand Down

0 comments on commit bfe32af

Please sign in to comment.