Fix: Use DocumentBriefResponse in DocumentListResponse to avoid validation error
This commit is contained in:
@@ -40,10 +40,6 @@ class DocumentResponse(BaseModel):
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class DocumentListResponse(BaseModel):
|
||||
documents: list[DocumentResponse]
|
||||
|
||||
|
||||
class DocumentBriefResponse(BaseModel):
|
||||
"""Brief document for list views without content."""
|
||||
id: str
|
||||
@@ -56,3 +52,7 @@ class DocumentBriefResponse(BaseModel):
|
||||
updated_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class DocumentListResponse(BaseModel):
|
||||
documents: list[DocumentBriefResponse]
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user