From ca02c9a731aac6f06cb81c97a37f5a355efb84d6 Mon Sep 17 00:00:00 2001 From: codey Date: Wed, 29 Jan 2025 15:48:47 -0500 Subject: [PATCH] unlist most endpoints --- endpoints/ai.py | 3 ++- endpoints/karma.py | 3 ++- endpoints/lastfm.py | 3 ++- endpoints/transcriptions.py | 3 ++- endpoints/xc.py | 3 ++- endpoints/yt.py | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/endpoints/ai.py b/endpoints/ai.py index 80a66f6..0f63a14 100644 --- a/endpoints/ai.py +++ b/endpoints/ai.py @@ -50,7 +50,8 @@ class AI(FastAPI): } for endpoint, handler in self.endpoints.items(): - app.add_api_route(f"/{endpoint}", handler, methods=["GET", "POST"]) + app.add_api_route(f"/{endpoint}", handler, methods=["GET", "POST"], + include_in_schema=False) async def respond_via_webhook(self, data: ValidHookSongRequest, originalRequest: Request): diff --git a/endpoints/karma.py b/endpoints/karma.py index 3a0082c..4093c62 100644 --- a/endpoints/karma.py +++ b/endpoints/karma.py @@ -119,7 +119,8 @@ class Karma(FastAPI): } for endpoint, handler in self.endpoints.items(): - app.add_api_route(f"/{endpoint}", handler, methods=["POST"]) + app.add_api_route(f"/{endpoint}", handler, methods=["POST"], + include_in_schema=False) async def top_karma_handler(self, request: Request, data: ValidTopKarmaRequest | None = None): diff --git a/endpoints/lastfm.py b/endpoints/lastfm.py index 6a43416..bda2eb4 100644 --- a/endpoints/lastfm.py +++ b/endpoints/lastfm.py @@ -73,7 +73,8 @@ class LastFM(FastAPI): } for endpoint, handler in self.endpoints.items(): - app.add_api_route(f"/{endpoint}", handler, methods=["POST"]) + app.add_api_route(f"/{endpoint}", handler, methods=["POST"], + include_in_schema=False) async def artist_by_name_handler(self, data: ValidArtistSearchRequest): """ diff --git a/endpoints/transcriptions.py b/endpoints/transcriptions.py index f43d685..f376331 100644 --- a/endpoints/transcriptions.py +++ b/endpoints/transcriptions.py @@ -36,7 +36,8 @@ class Transcriptions(FastAPI): } for endpoint, handler in self.endpoints.items(): - app.add_api_route(f"/{endpoint}", handler, methods=["POST"]) + app.add_api_route(f"/{endpoint}", handler, methods=["POST"], + include_in_schema=False) async def get_episodes_handler(self, data: ValidShowEpisodeListRequest): """ diff --git a/endpoints/xc.py b/endpoints/xc.py index 1d9857b..f77cc09 100644 --- a/endpoints/xc.py +++ b/endpoints/xc.py @@ -42,7 +42,8 @@ class XC(FastAPI): app.add_api_websocket_route(f"/{endpoint}/", handler) for endpoint, handler in self.endpoints.items(): - app.add_api_route(f"/{endpoint}", handler, methods=["POST"]) + app.add_api_route(f"/{endpoint}", handler, methods=["POST"], + include_in_schema=False) # async def put_ws_handler(self, ws: WebSocket): # await ws.accept() diff --git a/endpoints/yt.py b/endpoints/yt.py index 18046ee..6d42c24 100644 --- a/endpoints/yt.py +++ b/endpoints/yt.py @@ -27,7 +27,8 @@ class YT(FastAPI): } for endpoint, handler in self.endpoints.items(): - app.add_api_route(f"/{endpoint}", handler, methods=["POST"]) + app.add_api_route(f"/{endpoint}", handler, methods=["POST"], + include_in_schema=False) async def yt_video_search_handler(self, data: ValidYTSearchRequest): """