Hi, I am trying to use the gRPC API, but I am conf...
# talk-keto
n
Hi, I am trying to use the gRPC API, but I am confused by the .proto files, which contain optional fields that are not marked as optional example. Do you have an updated version somewhere or I should manually mark those fields?
s
Ah sorry about that. We would highly appreciate a PR to fix this 😉 Just initializing them to zero should work to use the defaults
n
In protobuf3, every field is optional (on the protocol layer). If you don't specify a value, it takes the default value (see https://developers.google.com/protocol-buffers/docs/proto3#default). What I'd like is to move to https://github.com/envoyproxy/protoc-gen-validate and annotate the proto files with validation rules that are then checked server-side.
n
Thanks for the reply. The problem i have is that when i try to generate types from those .proto files, i get required fields