File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ uv run datamodel-codegen \
22
22
--input-file-type jsonschema \
23
23
--output " $GENERATED_FILE " \
24
24
--target-python-version 3.10 \
25
- --output-model-type pydantic_v2.BaseModel \
25
+ --base-class a2a.utils.pydantic_base.A2ABaseModel \
26
26
--disable-timestamp \
27
27
--use-schema-description \
28
28
--use-union-operator \
@@ -32,6 +32,7 @@ uv run datamodel-codegen \
32
32
--use-one-literal-as-default \
33
33
--class-name A2A \
34
34
--use-standard-collections \
35
- --use-subclass-enum
35
+ --use-subclass-enum \
36
+ --snake-case-field
36
37
37
38
echo " Codegen finished successfully."
Original file line number Diff line number Diff line change
1
+ """A2A Pydantic Base Model with shared configuration."""
2
+
3
+ from pydantic import BaseModel , ConfigDict
4
+
5
+
6
+ class A2ABaseModel (BaseModel ):
7
+ """Base model for all A2A types with shared configuration."""
8
+
9
+ model_config = ConfigDict (
10
+ populate_by_name = True ,
11
+ arbitrary_types_allowed = True ,
12
+ )
You can’t perform that action at this time.
0 commit comments