diff --git a/runtime/datamate-python/app/module/annotation/schema/template.py b/runtime/datamate-python/app/module/annotation/schema/template.py index 27bd7706..a36d1f3e 100644 --- a/runtime/datamate-python/app/module/annotation/schema/template.py +++ b/runtime/datamate-python/app/module/annotation/schema/template.py @@ -85,7 +85,7 @@ class AnnotationTemplateResponse(BaseModel): class AnnotationTemplateListResponse(BaseModel): """模板列表响应""" content: List[AnnotationTemplateResponse] = Field(..., description="模板列表") - total: int = Field(..., description="总数") + totalElements: int = Field(..., description="总数") page: int = Field(..., description="当前页") size: int = Field(..., description="每页大小") total_pages: int = Field(alias="totalPages", description="总页数") diff --git a/runtime/datamate-python/app/module/annotation/service/template.py b/runtime/datamate-python/app/module/annotation/service/template.py index d2fa52dd..e5474924 100644 --- a/runtime/datamate-python/app/module/annotation/service/template.py +++ b/runtime/datamate-python/app/module/annotation/service/template.py @@ -212,7 +212,7 @@ async def list_templates( return AnnotationTemplateListResponse( content=[self._to_response(t) for t in templates], - total=total, + totalElements=total, page=page, size=size, totalPages=(total + size - 1) // size