Skip to content

Commit 3aea0c9

Browse files
review @sanderegg
1 parent 361f8d1 commit 3aea0c9

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

packages/models-library/src/models_library/api_schemas_webserver/projects_conversations.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
from datetime import datetime
22
from typing import Self
33

4+
from pydantic import Field
5+
46
from ..conversations import (
57
ConversationDB,
68
ConversationID,
@@ -18,12 +20,10 @@
1820
class ConversationRestGet(OutputSchema):
1921
conversation_id: ConversationID
2022
product_name: ProductName
21-
name: str
23+
name: str = Field(..., max_length=50)
2224
project_uuid: ProjectID | None
2325
user_group_id: GroupID
2426
type: ConversationType
25-
26-
# states
2727
created: datetime
2828
modified: datetime
2929

@@ -45,10 +45,8 @@ class ConversationMessageRestGet(OutputSchema):
4545
message_id: ConversationMessageID
4646
conversation_id: ConversationID
4747
user_group_id: GroupID
48-
content: str
48+
content: str = Field(..., max_length=4096)
4949
type: ConversationMessageType
50-
51-
# states
5250
created: datetime
5351
modified: datetime
5452

services/web/server/src/simcore_service_webserver/api/v0/openapi.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9211,6 +9211,7 @@ components:
92119211
minimum: 0
92129212
content:
92139213
type: string
9214+
maxLength: 4096
92149215
title: Content
92159216
type:
92169217
$ref: '#/components/schemas/ConversationMessageType'
@@ -9249,6 +9250,7 @@ components:
92499250
title: Productname
92509251
name:
92519252
type: string
9253+
maxLength: 50
92529254
title: Name
92539255
projectUuid:
92549256
anyOf:

services/web/server/src/simcore_service_webserver/projects/_controller/_rest_exceptions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@
88
CatalogItemNotFoundError,
99
CatalogNotAvailableError,
1010
)
11-
from simcore_service_webserver.conversations.errors import (
11+
12+
from ...conversations.errors import (
1213
ConversationErrorNotFoundError,
1314
ConversationMessageErrorNotFoundError,
1415
)
15-
1616
from ...exception_handling import (
1717
ExceptionToHttpErrorMap,
1818
HttpErrorInfo,

0 commit comments

Comments
 (0)