-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Trying to generate properties using the camelCase from underscores #1426
Comments
Hi Michael, I'm a little confused, the struct definition you've shared isn't something I'd have expected from and it's generated counterpart: The Furthermore, why are you invoking Having said all of that, this is not an issue with this project, as we do not control the |
Sounds good. I’ll post my question on slack and aim to figure out how to solve my problem there. Im still new to the grpc world, but I have noticed that none of your examples have underscores for the field names in message. Any chance you have an example using that? See https://developers.google.com/protocol-buffers/docs/style#message-and-field-names Thanks for quick feedback. |
Haha I had the same thought when I went through the examples. It's not important, but I thought it was funny that we didn't, you're right. Again, it's not really our responsibility to test that part, it's part of the official Google go protobuf project. |
📚 Documentation
I'm not entirely sure if this is a documentation issue, but the current proposed suggested method is to generate message using the undescore convention:
e.g.
When I generate this using:
I get this in the *.pb.go file:
For some reason, I can't get the flags to line up between the protofbuf json and the json marshal, specifically the
json=firstName
andjson:"first_name,omitempty"
Am I missing something from a documentation perspective? Is there a flag I need to set?
The text was updated successfully, but these errors were encountered: