We have an open-source http/gRPC service written in Go utilizing protovalidate to validate requests/responses.
For our php SDK, I am:
- Exporting the
protobuf definitions of the service with the command buf export <buf module> -o protos
- Generating the php code by executing the command
buf generate protos
buf.gen.yaml
version: v2
plugins:
- remote: buf.build/protocolbuffers/php:v29.3
out: ./src
- remote: buf.build/grpc/php:v1.70.1
out: ./src
Since the official code generator for PHP doesn't support proto2, I was trying to exclude protovalidate by using the new exclude_types feature but I am getting the following error:
Failure: imported file "buf/validate/validate.proto" was filtered out
I didn't quite understand what given error means and honestly I am a bit confused.
I'd love to have someones opinion on whether or not what I am trying is possible.