{"action":"opened","issue":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/578","repository_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway","labels_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/578/labels{/name}","comments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/578/comments","events_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/578/events","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/issues/578","id":306458267,"number":578,"title":"missing input var of  HTTP GET rpc, when request params include nested param","user":{"login":"runzexia","id":31230341,"avatar_url":"https://avatars3.githubusercontent.com/u/31230341?v=4","gravatar_id":"","url":"https://api.github.com/users/runzexia","html_url":"https://github.com/runzexia","followers_url":"https://api.github.com/users/runzexia/followers","following_url":"https://api.github.com/users/runzexia/following{/other_user}","gists_url":"https://api.github.com/users/runzexia/gists{/gist_id}","starred_url":"https://api.github.com/users/runzexia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/runzexia/subscriptions","organizations_url":"https://api.github.com/users/runzexia/orgs","repos_url":"https://api.github.com/users/runzexia/repos","events_url":"https://api.github.com/users/runzexia/events{/privacy}","received_events_url":"https://api.github.com/users/runzexia/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-19T13:17:40Z","updated_at":"2018-03-19T13:17:40Z","closed_at":null,"author_association":"NONE","body":"```\r\nsyntax = \"proto3\";\r\npackage test;\r\n\r\n// set go package name to pb\r\noption go_package = \"pb\";\r\n\r\nimport \"google/protobuf/wrappers.proto\";\r\nimport \"google/protobuf/timestamp.proto\";\r\nimport \"google/api/annotations.proto\";\r\nimport \"protoc-gen-swagger/options/annotations.proto\";\r\n\r\noption (grpc.gateway.protoc_gen_swagger.options.openapiv2_swagger) = {\r\n\tinfo: {\r\n\t\ttitle: \"OpenPitrix Project\";\r\n\t\tversion: \"0.0.1\";\r\n\t\tcontact: {\r\n\t\tname: \"OpenPitrix Project\";\r\n\t\turl: \"https://openpitrix.io\";\r\n\t\t};\r\n\t};\r\n\tschemes: HTTP;\r\n\tconsumes: \"application/json\";\r\n\tproduces: \"application/json\";\r\n};\r\n\r\nmessage DescribeUsersRequest{\r\n\trepeated User users = 1;\r\n\trepeated string status = 2;\r\n}\r\n\r\nmessage DescribeUsersResponse{\r\n\trepeated User users = 1;\r\n}\r\n\r\nmessage User{\r\n\tstring id = 1;\r\n}\r\n\r\nservice UserManager {\r\n\trpc DescribeUsers (DescribeUsersRequest) returns (DescribeUsersResponse) {\r\n\t\toption (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = {\r\n\t\t\tsummary: \"describe users\"\r\n\t\t};\r\n\t\toption (google.api.http) = {\r\n\t\t\tget: \"/v1/users\"\r\n\t\t};\r\n\t}\r\n}\r\n```\r\n\r\nRun cmd `protoc -I. -Ithird_party/googleapis -I../vendor/github.com/grpc-ecosystem/grpc-gateway/ -I/usr/local/include -I../vendor/ --swagger_out=logtostderr=true,allow_delete_body=true:../pkg/cmd/api/spec ./test.proto\r\n`\r\nResult, missing param users:\r\n```\r\n{\r\n  \"swagger\": \"2.0\",\r\n  \"info\": {\r\n    \"title\": \"Test Project\",\r\n    \"version\": \"0.0.1\",\r\n    \"contact\": {\r\n      \"name\": \"Test Project\",\r\n      \"url\": \"https://test.io\"\r\n    }\r\n  },\r\n  \"schemes\": [\r\n    \"http\"\r\n  ],\r\n  \"consumes\": [\r\n    \"application/json\"\r\n  ],\r\n  \"produces\": [\r\n    \"application/json\"\r\n  ],\r\n  \"paths\": {\r\n    \"/v1/users\": {\r\n      \"get\": {\r\n        \"summary\": \"describe users\",\r\n        \"operationId\": \"DescribeUsers\",\r\n        \"responses\": {\r\n          \"200\": {\r\n            \"description\": \"\",\r\n            \"schema\": {\r\n              \"$ref\": \"#/definitions/testDescribeUsersResponse\"\r\n            }\r\n          }\r\n        },\r\n        \"parameters\": [\r\n          {\r\n            \"name\": \"status\",\r\n            \"in\": \"query\",\r\n            \"required\": false,\r\n            \"type\": \"array\",\r\n            \"items\": {\r\n              \"type\": \"string\"\r\n            }\r\n          }\r\n        ],\r\n        \"tags\": [\r\n          \"UserManager\"\r\n        ]\r\n      }\r\n    }\r\n  },\r\n  \"definitions\": {\r\n    \"testDescribeUsersResponse\": {\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"users\": {\r\n          \"type\": \"array\",\r\n          \"items\": {\r\n            \"$ref\": \"#/definitions/testUser\"\r\n          }\r\n        }\r\n      }\r\n    },\r\n    \"testUser\": {\r\n      \"type\": \"object\",\r\n      \"properties\": {\r\n        \"id\": {\r\n          \"type\": \"string\"\r\n        }\r\n      }\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n\r\n"}}
{"actor":{"display_login":"runzexia"}}