From 36a4d45c489659ece974a30a14c3433dc0f75ead Mon Sep 17 00:00:00 2001 From: Gil Tinde <31830765+giltinde@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:37:36 +0200 Subject: [PATCH 1/2] fix: remove logo --- deployment/kubernetes/weather-api.yaml | 4 ++-- weather_api/__main__.py | 6 ------ weather_api/openapi/openapi.py | 4 ---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/deployment/kubernetes/weather-api.yaml b/deployment/kubernetes/weather-api.yaml index 89a784f..0238905 100644 --- a/deployment/kubernetes/weather-api.yaml +++ b/deployment/kubernetes/weather-api.yaml @@ -18,7 +18,7 @@ spec: prometheus.io/path: "/metrics" spec: containers: - - image: ghcr.io/openearthplatforminitiative/weather-api:0.1.4 + - image: ghcr.io/openearthplatforminitiative/weather-api:0.1.5 name: weather-api ports: - containerPort: 8080 @@ -26,7 +26,7 @@ spec: - name: API_ROOT_PATH value: "/weather" - name: VERSION - value: "0.1.4" + value: "0.1.5" - name: API_DOMAIN valueFrom: configMapKeyRef: diff --git a/weather_api/__main__.py b/weather_api/__main__.py index 9f9129d..9579319 100644 --- a/weather_api/__main__.py +++ b/weather_api/__main__.py @@ -2,7 +2,6 @@ from fastapi import FastAPI from fastapi.openapi.docs import get_redoc_html -from fastapi.staticfiles import StaticFiles from prometheus_fastapi_instrumentator import Instrumentator from weather_api.config import settings @@ -19,11 +18,6 @@ def get_application() -> FastAPI: ) api.include_router(weather_routes.router) api.include_router(system_resources.router) - api.mount( - f"/static", - StaticFiles(directory=this_dir / "assets"), - name="static", - ) api.openapi_schema = openapi.custom_openapi(api, this_dir / "example_code") Instrumentator().instrument(api).expose(api) diff --git a/weather_api/openapi/openapi.py b/weather_api/openapi/openapi.py index 1fc1990..670afa2 100644 --- a/weather_api/openapi/openapi.py +++ b/weather_api/openapi/openapi.py @@ -24,10 +24,6 @@ def custom_openapi(app: FastAPI, example_code_dir: Path): routes=app.routes, ) - openapi_schema["info"]["x-logo"] = { - "url": f"{settings.api_url}/static/icons/open-epi-logo.svg" - } - routes_that_need_doc = [ route for route in app.routes if isinstance(route, APIRoute) ] From 04a5cb665eed677f07f2cdbd571f163625146b21 Mon Sep 17 00:00:00 2001 From: Gil Tinde <31830765+giltinde@users.noreply.github.com> Date: Thu, 20 Jun 2024 10:38:38 +0200 Subject: [PATCH 2/2] delete logo --- weather_api/assets/icons/open-epi-logo.svg | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 weather_api/assets/icons/open-epi-logo.svg diff --git a/weather_api/assets/icons/open-epi-logo.svg b/weather_api/assets/icons/open-epi-logo.svg deleted file mode 100644 index b5e5f95..0000000 --- a/weather_api/assets/icons/open-epi-logo.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - -