grpc-ecosystem/grpc-gateway

Support nested messages in GET request queries

オープン

#492 opened on 2017/12/01

 (12 件のコメント) (10 件のリアクション) (0 人の担当者)Go (2,250 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (16,971 個のスター)
PR merge metrics
 (平均マージ 8d 23h) (30d で 147 merged PRs)

説明

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

コントリビューターガイド