Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camelCase proto field names generated as lowercase #286

Open
jjagged opened this issue Oct 11, 2024 · 0 comments · May be fixed by #294
Open

camelCase proto field names generated as lowercase #286

jjagged opened this issue Oct 11, 2024 · 0 comments · May be fixed by #294

Comments

@jjagged
Copy link

jjagged commented Oct 11, 2024

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant