From 02c3222f6bed59c36cda1821942fa8386cf648d8 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Fri, 17 Nov 2023 11:54:17 +0100 Subject: [PATCH 1/2] hide root from api schema --- pkgs/clan-cli/clan_cli/webui/routers/root.py | 2 +- pkgs/clan-cli/clan_cli/webui/tags.py | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/webui/routers/root.py b/pkgs/clan-cli/clan_cli/webui/routers/root.py index 550c6851a..07a2e811f 100644 --- a/pkgs/clan-cli/clan_cli/webui/routers/root.py +++ b/pkgs/clan-cli/clan_cli/webui/routers/root.py @@ -13,7 +13,7 @@ router = APIRouter() log = logging.getLogger(__name__) -@router.get("/{path_name:path}", tags=[Tags.root]) +@router.get("/{path_name:path}", include_in_schema=False) async def root(path_name: str) -> Response: if path_name == "": path_name = "index.html" diff --git a/pkgs/clan-cli/clan_cli/webui/tags.py b/pkgs/clan-cli/clan_cli/webui/tags.py index 0ecda5a74..b707529a4 100644 --- a/pkgs/clan-cli/clan_cli/webui/tags.py +++ b/pkgs/clan-cli/clan_cli/webui/tags.py @@ -33,9 +33,5 @@ tags_metadata: List[Dict[str, Any]] = [ { "name": str(Tags.modules), "description": "Manage cLAN modules of a flake", - }, - { - "name": str(Tags.root), - "description": "This serves as the frontend delivery", - }, + } ] From f07fb0522052361aa20486f464d8f0b36aaffa81 Mon Sep 17 00:00:00 2001 From: Johannes Kirschbauer Date: Fri, 17 Nov 2023 12:03:40 +0100 Subject: [PATCH 2/2] hide root from api schema --- pkgs/clan-cli/clan_cli/webui/routers/root.py | 3 +-- pkgs/clan-cli/clan_cli/webui/tags.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/pkgs/clan-cli/clan_cli/webui/routers/root.py b/pkgs/clan-cli/clan_cli/webui/routers/root.py index 07a2e811f..41807e928 100644 --- a/pkgs/clan-cli/clan_cli/webui/routers/root.py +++ b/pkgs/clan-cli/clan_cli/webui/routers/root.py @@ -6,14 +6,13 @@ from pathlib import Path from fastapi import APIRouter, Response from ..assets import asset_path -from ..tags import Tags router = APIRouter() log = logging.getLogger(__name__) -@router.get("/{path_name:path}", include_in_schema=False) +@router.get("/{path_name:path}", include_in_schema=False) async def root(path_name: str) -> Response: if path_name == "": path_name = "index.html" diff --git a/pkgs/clan-cli/clan_cli/webui/tags.py b/pkgs/clan-cli/clan_cli/webui/tags.py index b707529a4..6d6cff52f 100644 --- a/pkgs/clan-cli/clan_cli/webui/tags.py +++ b/pkgs/clan-cli/clan_cli/webui/tags.py @@ -33,5 +33,5 @@ tags_metadata: List[Dict[str, Any]] = [ { "name": str(Tags.modules), "description": "Manage cLAN modules of a flake", - } + }, ]