Closed doroginin closed 6 years ago
After this changes you can add binding with request/response mapping to repeated fields.
syntax = "proto3"; import "github.com/doroginin/grpc-gateway/third_party/googleapis/google/api/annotations.proto"; service Strings { rpc ToUpper (String) returns (String) { option (google.api.http) = { post: "/strings/to_upper" body: "str" response_body: "str" }; } } message String { repeated string str = 1; }
And in the result your request body will be: ["test","boo"] and response body will be: ["TEST","BOO"]
["test","boo"]
["TEST","BOO"]
Now also supported repeated field in GET See: integration/binding_with_body_and_response/pb/strings.proto GET request like this: /strings/to_upper/v2?str=test&str=boo
/strings/to_upper/v2?str=test&str=boo
After this changes you can add binding with request/response mapping to repeated fields.
And in the result your request body will be:
["test","boo"]
and response body will be:["TEST","BOO"]