Skip to content

Commit a77a40b

Browse files
committed
Change generation to create alias for snake_case
1 parent 0b6e1a3 commit a77a40b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/generate_types.sh

100644100755
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,5 @@ uv run datamodel-codegen \
3434
--class-name A2A \
3535
--use-standard-collections \
3636
--use-subclass-enum \
37-
--snake-case-field
3837

3938
echo "Codegen finished successfully."

src/a2a/pydantic_base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
"""A2A Pydantic Base Model with shared configuration."""
22

33
from pydantic import BaseModel, ConfigDict
4-
from pydantic.alias_generators import to_camel
4+
from pydantic.alias_generators import to_snake
55

66

77
class A2ABaseModel(BaseModel):
88
"""Base model for all A2A types with shared configuration."""
99

1010
model_config = ConfigDict(
11-
alias_generator=to_camel,
11+
alias_generator=to_snake,
1212
populate_by_name=True,
13+
arbitrary_types_allowed=True,
1314
)

0 commit comments

Comments
 (0)