Skip to content

Commit 5731bf3

Browse files
committed
chore: Change Type Generation to use live spec url
1 parent 429c422 commit 5731bf3

File tree

2 files changed

+994
-294
lines changed

2 files changed

+994
-294
lines changed

development.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,20 @@
22

33
## Type generation from spec
44

5-
<!-- TODO replace spec.json with the public url so we always get the latest version-->
6-
75
```bash
8-
uv run datamodel-codegen --input ./spec.json --input-file-type jsonschema --output ./src/a2a/types.py --target-python-version 3.10 --output-model-type pydantic_v2.BaseModel --disable-timestamp --use-schema-description --use-union-operator --use-field-description --use-default --use-default-kwarg --use-one-literal-as-default --class-name A2A --use-standard-collections
6+
uv run datamodel-codegen \
7+
--url https://raw.githubusercontent.com/google/A2A/refs/heads/main/specification/json/a2a.json \
8+
--input-file-type jsonschema \
9+
--output ./src/a2a/types.py \
10+
--target-python-version 3.10 \
11+
--output-model-type pydantic_v2.BaseModel \
12+
--disable-timestamp \
13+
--use-schema-description \
14+
--use-union-operator \
15+
--use-field-description \
16+
--use-default \
17+
--use-default-kwarg \
18+
--use-one-literal-as-default \
19+
--class-name A2A \
20+
--use-standard-collections
921
```

0 commit comments

Comments
 (0)