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 14, 2025
1 parent 7e03e77 commit 61bdb05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,8 +512,11 @@ Manually register the Swagger UI controller:
```yaml
# app/config/routes.yaml
api_doc:
path: /api_documentation
path: /api_documentation.{_format}
controller: api_platform.swagger_ui.action
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 61bdb05

Please sign in to comment.