Skip to content
7 changes: 7 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ plugins:
# Generates *_pb2.pyi files.
- remote: buf.build/protocolbuffers/pyi
out: src/a2a/types
# Generate Pydantic models with ProtoJSON compatibility
- local: protoc-gen-proto2pydantic
out: src/a2a/types
opt:
- preset=a2a
- base_class=a2a._base.A2ABaseModel
- output_file=a2a_pydantic.py
4 changes: 4 additions & 0 deletions scripts/gen_proto.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/bash
set -e

# Install proto2pydantic plugin for Pydantic model generation
echo "Installing protoc-gen-proto2pydantic@v0.4.0..."
go install github.com/protocgen/proto2pydantic@v0.4.0

Check failure on line 6 in scripts/gen_proto.sh

View workflow job for this annotation

GitHub Actions / Check Spelling

`protocgen` is not a recognized word. (unrecognized-spelling)

# Run buf generate to regenerate protobuf code and OpenAPI spec
npx --yes @bufbuild/buf generate

Expand Down
Loading
Loading