Skip to content

Commit 607c080

Browse files
authored
fix: multiple formats for custom "api_doc" route example (#2122)
1 parent 85d6897 commit 607c080

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

core/openapi.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,11 @@ Manually register the Swagger UI controller:
512512
```yaml
513513
# app/config/routes.yaml
514514
api_doc:
515-
path: /api_documentation
515+
path: /api_documentation.{_format}
516516
controller: api_platform.swagger_ui.action
517+
methods: ['HEAD', 'GET']
518+
defaults:
519+
_format: html
517520
```
518521

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

0 commit comments

Comments
 (0)