From 7723d5ef6c520ae0578cd25dd92673cddb3dcb0c Mon Sep 17 00:00:00 2001 From: Rafael Bradley <84998222+Nekidev@users.noreply.github.com> Date: Thu, 16 Jul 2026 02:09:45 -0300 Subject: [PATCH] Enhance ErrorSchema and Page with field descriptions Added descriptions to fields in ErrorSchema and Page classes. --- project/api/v1/schemas.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/project/api/v1/schemas.py b/project/api/v1/schemas.py index 21d66f0..88470dc 100644 --- a/project/api/v1/schemas.py +++ b/project/api/v1/schemas.py @@ -29,15 +29,15 @@ class BookSchema(BaseModel): class ErrorSchema(BaseModel): """A standard error response schema.""" - title: str - message: str + title: str = Field(..., description="A short, human-readable title of the error.") + message: str = Field(..., description="A more detailed description of the error.") class Page[T](BaseModel): """A standard paginated response schema.""" - items: list[T] - total: int + items: list[T] = Field(..., description="The items in the current page.") + total: int = Field(..., description="The amount of items available across all pages for this query.") @classmethod async def from_queryset(