Skip to content

Commit

Permalink
fix: multiple formats for custom "api_doc" route example
Browse files Browse the repository at this point in the history
  • Loading branch information
phansys committed Jan 8, 2025
1 parent 5aa23ed commit d5a490c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,11 @@ Manually register the Swagger UI controller:
```yaml
# app/config/routes.yaml
api_doc:
path: /api_documentation
controller: api_platform.swagger.action.ui
path: /api_documentation.{_format}
controller: api_platform.action.documentation
methods: ['HEAD', 'GET']
defaults:
_format: html
```

Change `/api_documentation` to the URI you wish Swagger UI to be accessible on.
Expand Down

0 comments on commit d5a490c

Please sign in to comment.