在 API-Platform 中启用 ReDoc 时出错
error when enabling ReDoc in API-Platform
API平台版本:1.2
这是我当前的 api_platform 配置文件:
api_platform:
enable_swagger_ui: false
enable_re_doc: true
mapping:
paths: ['%kernel.project_dir%/src/Entity']
我在启用 ReDoc 时遇到此错误:
(1/1) InvalidConfigurationException
Unrecognized option "enable_re_doc" under "api_platform". Available options are
"allow_plain_identifiers", "collection", "default_operation_path_resolver",
"description", "eager_loading", "enable_docs", "enable_entrypoint",
"enable_fos_user", "enable_nelmio_api_doc", "enable_profiler",
"enable_swagger", "enable_swagger_ui", "error_formats", "exception_to_status",
"formats", "graphql", "http_cache", "mapping", "name_converter", "oauth",
"path_segment_name_generator", "resource_class_directories", "swagger",
"title", "validator", "version".
您好,我遇到了同样的错误。
原来 APIPlatform 1.2 使用 api-core 2.3.6.
redoc 文档将在目前处于 Beta 阶段的 2.4 版中提供
(查看 https://github.com/api-platform/core/releases 以跟踪版本)。
因此,您要么必须使用 Beta 版本,要么再大摇大摆。
API平台版本:1.2
这是我当前的 api_platform 配置文件:
api_platform:
enable_swagger_ui: false
enable_re_doc: true
mapping:
paths: ['%kernel.project_dir%/src/Entity']
我在启用 ReDoc 时遇到此错误:
(1/1) InvalidConfigurationException
Unrecognized option "enable_re_doc" under "api_platform". Available options are
"allow_plain_identifiers", "collection", "default_operation_path_resolver",
"description", "eager_loading", "enable_docs", "enable_entrypoint",
"enable_fos_user", "enable_nelmio_api_doc", "enable_profiler",
"enable_swagger", "enable_swagger_ui", "error_formats", "exception_to_status",
"formats", "graphql", "http_cache", "mapping", "name_converter", "oauth",
"path_segment_name_generator", "resource_class_directories", "swagger",
"title", "validator", "version".
您好,我遇到了同样的错误。 原来 APIPlatform 1.2 使用 api-core 2.3.6.
redoc 文档将在目前处于 Beta 阶段的 2.4 版中提供 (查看 https://github.com/api-platform/core/releases 以跟踪版本)。
因此,您要么必须使用 Beta 版本,要么再大摇大摆。