pydantic docstrings

This commit is contained in:
2025-02-16 08:17:27 -05:00
parent 2a57348178
commit f47ea0665f
6 changed files with 51 additions and 11 deletions

View File

@ -82,6 +82,7 @@ class LyricSearch(FastAPI):
async def artist_typeahead_handler(self, data: ValidTypeAheadRequest) -> JSONResponse:
"""
Artist Type Ahead Handler
- **query**: The query
"""
if not isinstance(data.query, str) or len(data.query) < 2:
return JSONResponse(status_code=500, content={
@ -96,6 +97,8 @@ class LyricSearch(FastAPI):
async def song_typeahead_handler(self, data: ValidTypeAheadRequest) -> JSONResponse:
"""
Song Type Ahead Handler
- **query**: The query
- **pre_query**: The pre-query (artist)
"""
if not isinstance(data.pre_query, str)\
or not isinstance(data.query, str):