From 9b82286e22d52a636118eec80779833f2ddd5a3f Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 2 Jul 2025 18:33:59 +0000 Subject: [PATCH] api: Don't show the download endpoints in the API schema Signed-off-by: Michael Tremer --- src/api/downloads.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/downloads.py b/src/api/downloads.py index 11104425..f6f77043 100644 --- a/src/api/downloads.py +++ b/src/api/downloads.py @@ -33,7 +33,7 @@ router = fastapi.APIRouter( # XXX These endpoints need some ratelimiting applied -@router.head("/{path:path}") +@router.head("/{path:path}", include_in_schema=False) async def head(path: str) -> fastapi.Response: """ Handle any HEAD requests @@ -64,7 +64,7 @@ async def get_current_address( return ipaddress.ip_address(request.client.host) -@router.get("/{path:path}") +@router.get("/{path:path}", include_in_schema=False) async def get( path: str, current_address: ipaddress.IPv6Address | ipaddress.IPv4Address = \ fastapi.Depends(get_current_address), -- 2.47.2