Closed RobertB93 closed 4 years ago
Please provide a minimum reproduction repository.
set keepCase
option to true
in microservice options.
I think this option should be true
by default, it's not at the moment.
Like this:
app.connectMicroservice<MicroserviceOptions>({
transport: Transport.GRPC,
options: {
package: 'test',
protoPath: 'path/to/proto',
loader: { keepCase: true },
},
});
set
keepCase
option totrue
in microservice options. I think this option should betrue
by default, it's not at the moment. Like this:app.connectMicroservice<MicroserviceOptions>({ transport: Transport.GRPC, options: { package: 'test', protoPath: 'path/to/proto', loader: { keepCase: true }, }, });
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
I think that yes, you should set this to true
by default, and yes, you should mention this in the docs. This is a stupid "feature". GRPC is intended for inter-systems communication. That potentially means or includes different operating systems, different programming languages, and, yes, different case conventions too.
Bug 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:
works:
Expected behavior
Support for message field names, regardless whether they contain an underscore or not.
Environment