By default proto3 JSON printer should convert the field name to
lowerCamelCase and use that as the JSON name. An implementation
may provide an option to use proto field name as the JSON name
instead.
The serde plugin does this correctly, but when the rules specify the preserve_proto_field_names option, two things happen:
The generated serde code preserves the proto field names (instead of converting the casing as it should)
The user of these bazel rules cannot override the choice
If, instead, rules_proto_grpc avoids specifying this flag, it can be optionally added to the rust_prost_proto_library invocation in user code via options:
Quoting 1:
The serde plugin does this correctly, but when the rules specify the
preserve_proto_field_names
option, two things happen:If, instead, rules_proto_grpc avoids specifying this flag, it can be optionally added to the rust_prost_proto_library invocation in user code via
options
:Thus, the better default is to leave out this flag from rules_proto_grpc and instead allow the user to choose.