Commit 10a037b
committed
feat: add proto2pydantic Pydantic model generation pipeline
Add protoc-gen-proto2pydantic plugin to buf.gen.yaml for generating
Pydantic models alongside existing protobuf _pb2 objects.
Generated models:
- 39 Pydantic models + 2 enums from a2a.proto
- All extend A2ABaseModel with to_proto_json() for ProtoJSON compat
- Keyword escaping (list -> list_ with alias='list')
- Timestamp field serializers for RFC 3339
- Oneof unions for Part.content, SecurityScheme.scheme, etc.
This is an additive change - existing a2a_pb2 imports are untouched.
New Pydantic models available via: from a2a.types.a2a_pydantic import ...1 parent 8d18d3d commit 10a037b
3 files changed
Lines changed: 717 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
0 commit comments