From e8f9b18418bfbeae2459802905ef702b57c52f3b Mon Sep 17 00:00:00 2001 From: Clemente Raposo Date: Thu, 11 Mar 2021 10:46:39 +0000 Subject: [PATCH] Move api documentation to /docs - Enable swagger docs - Disable re-doc - Move rest docs path to /docs/rest - Move graphql docs path to /docs/graphql --- config/packages/api_platform.yaml | 3 ++- config/routes/api_platform.yaml | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/config/packages/api_platform.yaml b/config/packages/api_platform.yaml index d7b2a1ab5..5a6dcd400 100644 --- a/config/packages/api_platform.yaml +++ b/config/packages/api_platform.yaml @@ -37,7 +37,8 @@ api_platform: # The oauth scopes. scopes: [] - enable_swagger_ui: false + enable_swagger_ui: true + enable_re_doc: false # Specify a path name generator to use. path_segment_name_generator: api_platform.path_segment_name_generator.dash diff --git a/config/routes/api_platform.yaml b/config/routes/api_platform.yaml index 8a828a0e5..24f9549ae 100644 --- a/config/routes/api_platform.yaml +++ b/config/routes/api_platform.yaml @@ -2,3 +2,11 @@ api_platform: resource: . type: api_platform prefix: /api + +swagger_ui: + path: /docs/rest + controller: api_platform.swagger.action.ui + +graphiql: + path: /docs/graphql + controller: api_platform.graphql.action.graphiql