Skip to content

Commit 8c9eeed

Browse files
committed
fixes: tests/optional/quality/test_edge_cases.py::test_empty_arrays
1 parent 01026f1 commit 8c9eeed

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/a2a/_base.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,4 @@ class A2ABaseModel(BaseModel):
3535
validate_by_alias=True,
3636
serialize_by_alias=True,
3737
alias_generator=to_camel_custom,
38-
extra='forbid',
3938
)

src/a2a/types.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,7 @@ class MessageSendConfiguration(A2ABaseModel):
12951295
"""
12961296
The number of most recent messages from the task's history to retrieve in the response.
12971297
"""
1298+
push_notification_config: PushNotificationConfig | None = None
12981299
"""
12991300
Configuration for the agent to send push notifications for updates after the initial response.
13001301
"""
@@ -1412,6 +1413,13 @@ class Artifact(A2ABaseModel):
14121413
An array of content parts that make up the artifact.
14131414
"""
14141415

1416+
@field_validator('parts')
1417+
@classmethod
1418+
def validate_parts(cls, v: list[Part]) -> list[Part]:
1419+
if not v:
1420+
raise ValueError('Artifact must have at least one part')
1421+
return v
1422+
14151423

14161424
class DeleteTaskPushNotificationConfigResponse(
14171425
RootModel[

0 commit comments

Comments
 (0)