I'm trying to disable the Swagger UI, or more precisely, because I want us to provide it only for non-production environments.
I referenced this link, but nothing happened.
My api_platform.yaml File:
api_platform:
defaults:
route_prefix: '/%env(API_ROUTE)%'
enable_docs: false
enable_entrypoint: false
enable_swagger_ui: false
swagger:
api_keys:
JWT:
name: Authorization
type: header
collection:
pagination:
enabled: true
api_platform: defaults: route_prefix: '/%env(API_ROUTE)%' swagger: api_keys: JWT: name: Authorization type: header collection: pagination: enabled: true when@prod: api_platform: enable_docs: false enable_entrypoint: false enable_swagger_ui: falseYour api_platform.yaml will look like this. If you use the environment correctly then your swagger will only be disabled in your production environment.