We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 596e6db commit fd679b6Copy full SHA for fd679b6
src/a2a/_base.py
@@ -1,3 +1,4 @@
1
+from typing import Any
2
from pydantic import BaseModel, ConfigDict
3
from pydantic.alias_generators import to_camel
4
@@ -34,3 +35,13 @@ class A2ABaseModel(BaseModel):
34
35
populate_by_name=True,
36
alias_generator=to_camel_custom,
37
)
38
+
39
+ def model_dump(
40
+ self,
41
+ **kwargs
42
+ ) -> dict[str, Any]:
43
44
+ if not 'by_alias' in kwargs:
45
+ kwargs['by_alias'] = True
46
47
+ return super().model_dump(**kwargs)
0 commit comments