grpc-ecosystem/grpc-gateway

protoc-gen-swagger: support maps in query parameters

Open

#984 opened on 2019年8月6日

GitHub で見る
 (10 comments) (0 reactions) (0 assignees)Go (16,971 stars) (2,250 forks)batch import
bughelp wantedopenapi

説明

Hi guys, having following definition:

message Test {
    map<string, string> filters = 1;
}

service TestService {
    rpc TestRpc(Test) returns (Test) {
        option (google.api.http) = {
            get: "/test"
        };
    }
}

Which goes through swagger generator and ends up without the map being mentioend as parameters in request:

"/test": {
      "get": {
        "operationId": "TestRpc",
        "responses": {
          "200": {
            "description": "A successful response.",
            "schema": {
              "$ref": "#/definitions/offersTest"
            }
          }
        },
        "tags": [
          "TestService"
        ]
      }
    }

I thought that I can add map params to the query... but I dont think so now and I cant tell if it's a bug... KR Jirka

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

protoc-gen-swagger: support maps in query parameters · grpc-ecosystem/grpc-gateway#984 | Good First Issue