ITADN

camelCase proto field names generated as lowercase

#286Closedjjagged 创建于 2024-10-11
J
jjaggedcommented
This is another example of us not using proto best practices (similar to #284 and #285). Camel case proto fields are generated as fully lowercase in protokt. Full example [here](https://github.com/jjagged/protokt-test/) ``` message HelloRequest { string message = 1; string message_two = 2; string messageThree = 3; } ``` generates to ``` @GeneratedMessage("helloworld.HelloRequest") public class HelloRequest private constructor( @GeneratedProperty(1) public val message: String, @GeneratedProperty(2) public val messageTwo: String, @GeneratedProperty(3) public val messagethree: String, public val unknownFields: UnknownFieldSet = UnknownFieldSet.empty() ) ``` It is maybe not a bug per se, but it is inconsistent with how `protobuf-java` and `protobuf-kotlin` generates code so I thought I'd report it.
关闭于 2024-12-04 0 条评论