grpc-ecosystem/grpc-gateway

Support nested messages in GET request queries

Open

#492 创建于 2017年12月1日

在 GitHub 查看
 (12 评论) (10 反应) (0 负责人)Go (16,971 star) (2,250 fork)batch import
enhancementhelp wanted

描述

Given the

service MyService {
    rpc myMethod (myMethodRequest) returns (myMethodResponse) {
        option (google.api.http) = {
            get: "/method/all"
        };
    }
}

message myMethodRequest {
    repeated Scoped scope = 1;

    message Scoped {
        oneof condition {
            ById by_id = 1;
        }
        message ById {
            uint32 id = 1;
        }
    }
}

message myMethodResponse {
    repeated uint32 ids = 1;
}

with GET request

localhost:8080/method/all?scope.by_id.id=3

returns an error

unexpected repeated field in scope.by_id.id

贡献者指南