Skip to content

Commit a48c4ff

Browse files
committed
fixed issue in update dto
1 parent d4fcf62 commit a48c4ff

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

backend/src/app/core/data/dto/source_document.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ class SourceDocumentBaseDTO(BaseModel):
3232

3333
# Properties for updating
3434
class SourceDocumentUpdate(BaseModel, UpdateDTOBase):
35-
name: str = Field(
36-
description="User-defined name of the document (default is the filename)"
35+
name: Optional[str] = Field(
36+
description="User-defined name of the document (default is the filename)",
37+
default=None,
3738
)
38-
folder_id: int = Field(
39-
description="ID of the Folder this SourceDocument belongs to"
39+
folder_id: Optional[int] = Field(
40+
description="ID of the Folder this SourceDocument belongs to", default=None
4041
)
4142

4243

frontend/src/api/openapi/models/SourceDocumentUpdate.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ export type SourceDocumentUpdate = {
66
/**
77
* User-defined name of the document (default is the filename)
88
*/
9-
name: string;
9+
name?: string | null;
1010
/**
1111
* ID of the Folder this SourceDocument belongs to
1212
*/
13-
folder_id: number;
13+
folder_id?: number | null;
1414
};

frontend/src/openapi.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10799,18 +10799,17 @@
1079910799
"SourceDocumentUpdate": {
1080010800
"properties": {
1080110801
"name": {
10802-
"type": "string",
10802+
"anyOf": [{ "type": "string" }, { "type": "null" }],
1080310803
"title": "Name",
1080410804
"description": "User-defined name of the document (default is the filename)"
1080510805
},
1080610806
"folder_id": {
10807-
"type": "integer",
10807+
"anyOf": [{ "type": "integer" }, { "type": "null" }],
1080810808
"title": "Folder Id",
1080910809
"description": "ID of the Folder this SourceDocument belongs to"
1081010810
}
1081110811
},
1081210812
"type": "object",
10813-
"required": ["name", "folder_id"],
1081410813
"title": "SourceDocumentUpdate"
1081510814
},
1081610815
"SpanAnnoTimelineAnalysisFilter-Input": {

0 commit comments

Comments
 (0)