{"action":"created","issue":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/820","repository_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway","labels_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/820/labels{/name}","comments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/820/comments","events_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/820/events","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/820","id":386284211,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1MDYzOTE3","number":820,"title":"Add constant behavior to protoc-gen-swagger Duplicate for #819","user":{"login":"burov","id":35362875,"node_id":"MDQ6VXNlcjM1MzYyODc1","avatar_url":"https://avatars1.githubusercontent.com/u/35362875?v=4","gravatar_id":"","url":"https://api.github.com/users/burov","html_url":"https://github.com/burov","followers_url":"https://api.github.com/users/burov/followers","following_url":"https://api.github.com/users/burov/following{/other_user}","gists_url":"https://api.github.com/users/burov/gists{/gist_id}","starred_url":"https://api.github.com/users/burov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burov/subscriptions","organizations_url":"https://api.github.com/users/burov/orgs","repos_url":"https://api.github.com/users/burov/repos","events_url":"https://api.github.com/users/burov/events{/privacy}","received_events_url":"https://api.github.com/users/burov/received_events","type":"User","site_admin":false},"labels":[{"id":816045817,"node_id":"MDU6TGFiZWw4MTYwNDU4MTc=","url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/labels/cla:%20no","name":"cla: no","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-30T17:38:40Z","updated_at":"2018-12-03T07:52:23Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/820","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/820","diff_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/820.diff","patch_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/820.patch"},"body":"This PR should cover the use case when we map path to a payload data, but it is not properly reflected in generated swagger schema.\r\n\r\nLets assume we have following in proto:\r\n\r\nmessage Id {\r\n  string app_name = 1;\r\n  string resource_type = 2;\r\n}\r\nand following gateway mappings for some of the rpcs:\r\n\r\npost: /{id.app_name=app}/{id.resource_type=foo}\r\n...\r\npost: /{id.app_name=app}/{id.resource_type=bar}\r\nIn swagger schema it will look like /{id.app_name}/{id.resource_type} in both cases\r\n\r\nThis PR will make plugin to generate /app/foo and /app/bar respectively which seems to be more correct. At the same time it will generate /{id.app_name}/{id.resource_type} is there is no = assignments in proto.\r\n\r\nThanks\r\n\r\nIt duplicate #819  because "},"comment":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/comments/443618938","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/820#issuecomment-443618938","issue_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/820","id":443618938,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0MzYxODkzOA==","user":{"login":"burov","id":35362875,"node_id":"MDQ6VXNlcjM1MzYyODc1","avatar_url":"https://avatars1.githubusercontent.com/u/35362875?v=4","gravatar_id":"","url":"https://api.github.com/users/burov","html_url":"https://github.com/burov","followers_url":"https://api.github.com/users/burov/followers","following_url":"https://api.github.com/users/burov/following{/other_user}","gists_url":"https://api.github.com/users/burov/gists{/gist_id}","starred_url":"https://api.github.com/users/burov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/burov/subscriptions","organizations_url":"https://api.github.com/users/burov/orgs","repos_url":"https://api.github.com/users/burov/repos","events_url":"https://api.github.com/users/burov/events{/privacy}","received_events_url":"https://api.github.com/users/burov/received_events","type":"User","site_admin":false},"created_at":"2018-12-03T07:52:23Z","updated_at":"2018-12-03T07:52:23Z","author_association":"NONE","body":"@johanbrandhorst Yes, you understand me, ok thanks,  i will do it "}}
{"actor":{"display_login":"burov"}}