From 601a66284f462b3c18563af4d3a411bc2b99f7e0 Mon Sep 17 00:00:00 2001 From: gitgernit Date: Fri, 21 Nov 2025 22:28:14 +0300 Subject: [PATCH] feat(): proper type annotation for resume routes --- src/template_project/web_api/routes/resume.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/template_project/web_api/routes/resume.py b/src/template_project/web_api/routes/resume.py index c0ae4c4..08d4fad 100644 --- a/src/template_project/web_api/routes/resume.py +++ b/src/template_project/web_api/routes/resume.py @@ -1,5 +1,6 @@ from decimal import Decimal from enum import StrEnum +from typing import Annotated from dishka.integrations.fastapi import DishkaRoute from fastapi import APIRouter, Depends, Query @@ -204,8 +205,8 @@ async def get_resume( }, ) async def get_resume_list( - limit: int = Query(..., ge=1, le=100, description="Number of resumes to return", examples=[10]), - offset: int = Query(..., ge=0, description="Number of resumes to skip", examples=[0]), + limit: Annotated[int, Query(ge=1, le=100, description="Number of resumes to return", examples=[10])], + offset: Annotated[int, Query(ge=0, description="Number of resumes to skip", examples=[0])], ) -> GetResumeListResponse: # TODO: Implement resume list retrieval raise NotImplementedError @@ -267,8 +268,8 @@ class PatchResumeResponse(BaseModel): ) async def get_resume_history( resume_id: str, - limit: int = Query(..., ge=1, le=100, description="Number of history items to return", examples=[10]), - offset: int = Query(..., ge=0, description="Number of history items to skip", examples=[0]), + limit: Annotated[int, Query(ge=1, le=100, description="Number of history items to return", examples=[10])], + offset: Annotated[int, Query(ge=0, description="Number of history items to skip", examples=[0])], ) -> GetResumeHistoryResponse: # TODO: Implement resume history retrieval raise NotImplementedError