From 81560ad45fa5ddb0ebb2eea9b75c8b0373381f3c Mon Sep 17 00:00:00 2001 From: Aliaksandr Skurydzin <30345577+askurydzin@users.noreply.github.com> Date: Mon, 1 Oct 2018 23:03:38 +0300 Subject: [PATCH] fix id param name (#4) --- protoc-gen-swagger/genswagger/atlas_patch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protoc-gen-swagger/genswagger/atlas_patch.go b/protoc-gen-swagger/genswagger/atlas_patch.go index 83f49904bdb..f6fd2dbe7e5 100644 --- a/protoc-gen-swagger/genswagger/atlas_patch.go +++ b/protoc-gen-swagger/genswagger/atlas_patch.go @@ -124,7 +124,7 @@ The service-defined string used to identify a page of resources. A null value in default: } // Replace resource_id with id - } else if strings.HasSuffix(param.Name, "id.resource_id") { + } else if strings.HasSuffix(param.Name, "id.resource_id") || strings.HasSuffix(param.Name, ".id") { param.Name = "id" fixedParams = append(fixedParams, param) } else {