From 9c6b74807353b741f40d9bb618d58a6464cb9f45 Mon Sep 17 00:00:00 2001 From: Kalyan R Date: Wed, 20 Nov 2024 21:31:56 +0530 Subject: [PATCH] fix (#44215) --- .../core_api/openapi/v1-generated.yaml | 2 +- .../api_fastapi/core_api/routes/public/config.py | 16 +++++++++------- airflow/ui/openapi-gen/requests/services.gen.ts | 2 +- airflow/ui/openapi-gen/requests/types.gen.ts | 2 +- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/airflow/api_fastapi/core_api/openapi/v1-generated.yaml b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml index 3c1d85761ec94..c1aadeb6b6dac 100644 --- a/airflow/api_fastapi/core_api/openapi/v1-generated.yaml +++ b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml @@ -1789,7 +1789,7 @@ paths: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' - /public/config/: + /public/config: get: tags: - Config diff --git a/airflow/api_fastapi/core_api/routes/public/config.py b/airflow/api_fastapi/core_api/routes/public/config.py index eb26cfcd2c02a..13edf5f821b4c 100644 --- a/airflow/api_fastapi/core_api/routes/public/config.py +++ b/airflow/api_fastapi/core_api/routes/public/config.py @@ -94,17 +94,18 @@ def _response_based_on_accept(accept: Mimetype, config: Config): @config_router.get( - "/", + "", responses={ **create_openapi_http_exception_doc( [ - status.HTTP_401_UNAUTHORIZED, - status.HTTP_403_FORBIDDEN, status.HTTP_404_NOT_FOUND, status.HTTP_406_NOT_ACCEPTABLE, ] ), - "200": {"description": "Successful Response", "content": text_example_response_for_get_config}, + status.HTTP_200_OK: { + "description": "Successful Response", + "content": text_example_response_for_get_config, + }, }, response_model=Config, ) @@ -142,13 +143,14 @@ def get_config( responses={ **create_openapi_http_exception_doc( [ - status.HTTP_401_UNAUTHORIZED, - status.HTTP_403_FORBIDDEN, status.HTTP_404_NOT_FOUND, status.HTTP_406_NOT_ACCEPTABLE, ] ), - "200": {"description": "Successful Response", "content": text_example_response_for_get_config_value}, + status.HTTP_200_OK: { + "description": "Successful Response", + "content": text_example_response_for_get_config_value, + }, }, response_model=Config, ) diff --git a/airflow/ui/openapi-gen/requests/services.gen.ts b/airflow/ui/openapi-gen/requests/services.gen.ts index 6689fce3a837d..7c0c348c753b8 100644 --- a/airflow/ui/openapi-gen/requests/services.gen.ts +++ b/airflow/ui/openapi-gen/requests/services.gen.ts @@ -1114,7 +1114,7 @@ export class ConfigService { ): CancelablePromise { return __request(OpenAPI, { method: "GET", - url: "/public/config/", + url: "/public/config", headers: { accept: data.accept, }, diff --git a/airflow/ui/openapi-gen/requests/types.gen.ts b/airflow/ui/openapi-gen/requests/types.gen.ts index 27e3546e5c7be..e78e3a186855c 100644 --- a/airflow/ui/openapi-gen/requests/types.gen.ts +++ b/airflow/ui/openapi-gen/requests/types.gen.ts @@ -2514,7 +2514,7 @@ export type $OpenApiTs = { }; }; }; - "/public/config/": { + "/public/config": { get: { req: GetConfigData; res: {