ts-proto
ts-proto copied to clipboard
The structure in the generated type file does not match the structure of the response
I am trying to send NullValue My ts file looks like this:
export interface FullBootRecord {
kind?:
| { $case: "empty"; empty: NullValue }
| { $case: "data"; data: BootRecordWithTarget };
}
It is generated from proto:
message FullBootRecord {
oneof kind {
google.protobuf.NullValue empty = 1;
BootRecordWithTarget data = 2;
}
}
I am waiting to receive an answer:
{kind: { $case: "empty"; empty: 0 }}
or
{kind : { $case: "data"; data: {path: "/home/se/cache/ex.dat"} }
But I am getting the answer:
{kind: "empty", empty: "NullValue"}}
Platform: nestjs 8.0.0 Node: 14.17.1
You have thoughts on this matter? Thanks
I made minimal reproduction repository, so you can see the problem and run your tests.
https://github.com/NikitaSharapov/grpc-problem
@stephenh Do you know anything about that?