gRPC Client does not send fields when field name contains underscore
See original GitHub issueBug Report
Current behavior
Having a Nestjs gRPC Client using a .proto file that contains message field names with an underscore leads to those fields not being sent and thus falling back to their defaults.
Input Code
Does not work:
message ConfigNew {
int32 id = 1;
string test_string = 2;
}
works:
message ConfigNew {
int32 id = 1;
string teststring = 2;
}
Expected behavior
Support for message field names, regardless whether they contain an underscore or not.
Environment
- Nest version: 7.2.0
- Node version: v12.16.2
- Platform: Linux
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
NestJS gRPC empty return - Stack Overflow
gRPC Client does not send fields when field name contains underscore. You should delete all underscores from access_token and then works.
Read more >gRPC - Microservices - A progressive Node.js framework
Warning gRPC Client will not send fields that contain underscore _ in their names unless the keepCase options is set to true in...
Read more >How to Design Messages for gRPC Services in .NET Core
Defining your gRPC service using the Protocol Buffers specification is pretty easy. There are just a couple of things to be aware of...
Read more >Style Guide | Protocol Buffers - Google Developers
Use CamelCase (with an initial capital) for message names – for example, SongServerRequest . Use underscore_separated_names for field names (including oneof ...
Read more >Customizing your gateway | gRPC-Gateway - GitHub Pages
You can have Elasticsearch-style ?pretty support in your gateway's ... messages with fields named pretty ; also, this example code does not remove...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, you are right! It works as expected when setting the loader options, thank you. I think we should either enable this by default (if applicable) or at least mention in the docs, what do you guys think?
Let’s track this here https://github.com/nestjs/docs.nestjs.com/issues/1297