diff --git a/protobuf-parse/src/pure/convert/mod.rs b/protobuf-parse/src/pure/convert/mod.rs index 3bb63f2f2..a18b5e203 100644 --- a/protobuf-parse/src/pure/convert/mod.rs +++ b/protobuf-parse/src/pure/convert/mod.rs @@ -341,6 +341,14 @@ impl<'a> Resolver<'a> { .full_name .to_string(), ); + + if input.client_streaming { + output.set_client_streaming(input.client_streaming); + } + + if input.server_streaming { + output.set_server_streaming(input.server_streaming); + } Ok(output) } diff --git a/test-crates/protobuf-codegen-protoc-test/src/v2/test_stream_pb.proto b/test-crates/protobuf-codegen-protoc-test/src/v2/test_stream_pb.proto new file mode 100644 index 000000000..58737a585 --- /dev/null +++ b/test-crates/protobuf-codegen-protoc-test/src/v2/test_stream_pb.proto @@ -0,0 +1,18 @@ +syntax = "proto2"; + + +message Req { + required int32 a = 1; + repeated string b = 2; +} + +message Resp { + required int32 status = 1; +} + +service TestService { + rpc test_client_streaming(stream Req) returns (Resp); + rpc test_server_streaming(Req) returns (stream Resp); + rpc test_bi_streaming(stream Req) returns (stream Resp); +} +