docs
docs copied to clipboard
Unable to change the Swagger UI Location
@see https://github.com/api-platform/api-platform/issues/635
About the api-platform documentation at: Changing the Swagger UI Location
I got this error for "/" and "/docs" routes: Serialization for the format html is not supported.
#api/config/routes.yaml
swagger_ui:
path: /docs
controller: api_platform.swagger.action.ui
# api/config/packages/api_platform.yaml
api_platform:
# ...
enable_swagger_ui: false
It's due to the route vendor/api-platform/core/src/Bridge/Symfony/Bundle/Resources/config/routing/docs.xml : /docs.{_format} used for the hydra doc.
For change the Swagger UI location, we need to :
- Override the
/docs.{_format}route - or Choose another location of "/docs"
Can we have a complete configuration file ?
See https://github.com/api-platform/docs/pull/1604.