From cd34885b0224da9d2f285e6850abb7e8882317bf Mon Sep 17 00:00:00 2001 From: Valentin Valchev Date: Wed, 1 Feb 2017 18:20:12 +0200 Subject: [PATCH] Fixed issue #4664: [go] incorrect code generated, if there are more than 1 array parameters (#4683) --- modules/swagger-codegen/src/main/resources/go/api.mustache | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/go/api.mustache b/modules/swagger-codegen/src/main/resources/go/api.mustache index 33f11a0bde1..37d9ac7e6dc 100644 --- a/modules/swagger-codegen/src/main/resources/go/api.mustache +++ b/modules/swagger-codegen/src/main/resources/go/api.mustache @@ -82,8 +82,8 @@ func (a {{{classname}}}) {{{nickname}}}({{#allParams}}{{paramName}} {{{dataType} {{#hasQueryParams}} {{#queryParams}} {{#isListContainer}} - var collectionFormat = "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}" - localVarQueryParams.Add("{{baseName}}", a.Configuration.APIClient.ParameterToString({{paramName}}, collectionFormat)) + var {{paramName}}CollectionFormat = "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}" + localVarQueryParams.Add("{{baseName}}", a.Configuration.APIClient.ParameterToString({{paramName}}, {{paramName}}CollectionFormat)) {{/isListContainer}} {{^isListContainer}}