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

Field renaming #31

Open
bragov4ik opened this issue Jul 4, 2024 · 1 comment
Open

Field renaming #31

bragov4ik opened this issue Jul 4, 2024 · 1 comment
Labels
question Further information is requested

Comments

@bragov4ik
Copy link

It seems that in generated HTTP server, fields of messages are renamed to camel case. Is this a feature?

@bragov4ik bragov4ik added the question Further information is requested label Jul 4, 2024
@leviska
Copy link
Collaborator

leviska commented Jul 5, 2024

Basically that's the specification

https://protobuf.dev/programming-guides/proto3/#json

Message field names are mapped to lowerCamelCase and become JSON object keys. If the json_name field option is specified, the specified value will be used as the key instead. Parsers accept both the lowerCamelCase name (or the one specified by the json_name option) and the original proto field name

While parsers should accept both, most libraries (for other languages) output lowerCamelCase as a default, so we decided to use that

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

No branches or pull requests

2 participants