core
core copied to clipboard
Errors while Swagger is disabled in Symfony
API Platform version(s) affected: 4.2.9
Description
There is an error while Swagger is disabled.
For config file:
when@prod:
api_platform:
enable_docs: false
enable_entrypoint: false
enable_swagger: false
enable_swagger_ui: false
enable_re_doc: false
an error is:
[!CAUTION] In DefinitionErrorExceptionPass.php line 51: You have requested a non-existent parameter "api_platform.enable_swagger_ui". Did you mean one of these: "api_platform.enable_entrypoint", "api_platform.enable_docs"?
For config file without ui an re_doc:
when@prod:
api_platform:
enable_docs: false
enable_entrypoint: false
enable_swagger: false
an error is:
[!CAUTION] In ApiPlatformExtension.php line 586: You can not enable the Swagger UI without enabling Swagger, fix this by enabling swagger via the configuration "enable_swagger: true".
The only corrent option is:
when@prod:
api_platform:
enable_docs: false
enable_entrypoint: false
enable_swagger: true
enable_swagger_ui: false
enable_re_doc: false
which isn't good, because you have to enable Swagger to disable Swagger UI and ReDoc