Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/a2a/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1394,7 +1394,7 @@ class Artifact(A2ABaseModel):
"""
An optional, human-readable name for the artifact.
"""
parts: list[Part]
parts: list[Part] = Field(min_length=1)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

While this change correctly enforces the min_length constraint, this file is marked as auto-generated by datamodel-codegen at the top. Manual edits to generated files are fragile and likely to be overwritten the next time the code generation script is run. To make this change permanent, the constraint should be added to the source JSON schema (likely as "minItems": 1 for the parts array within the Artifact definition) and then this Python model file should be regenerated.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that types.py is automatically generated. I have opened an issue in the main repository to ensure the constraint is included during model generation: a2aproject/A2A#1456

"""
An array of content parts that make up the artifact.
"""
Expand Down
Loading