I have GRPC service with the following function:
rpc StreamMessages(StreamMessagesRequest) returns (stream google.protobuf.StringValue) {
option (google.api.http) = {
post: "/messages:stream"body: "*"
};
}
With grpc-gateway behind it.
Once I have collection of 3 strings: "msg1", "msg2", "msg3" - wrapping every one as com.google.protobuf.wrappers.StringValue and returning as stream. On GRPC side everything fine, but when I'm trying to execute REST request via gateway the issue happens:
According to documentation, Json representation of google.protobuf.StringValue is just JsonString, so expected streaming result is:
"msg1"
"msg2"
"msg3"
But it returns unexpected format instead:
{"result":"msg1"}
{"result":"msg2"}
{"result":"msg3"}
Question: How can I cause gateway to return the expected?