grpc-ecosystem/grpc-gateway

protoc-gen-swagger: support maps in query parameters

开放

#984 创建于 2019年8月6日

 (10 条评论) (0 个反应) (0 位负责人)Go (2,250 个派生)batch import
bughelp wantedopenapi

仓库指标

星标
 (16,971 个星标)
PR 合并指标
 (平均合并 8天 23小时) (30 天内合并 147 个 PR)

描述

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

贡献者指南