Merge pull request #3463 from neilotoole/issue-3462-caseified-query-param

Issue 3462 caseified query param
This commit is contained in:
wing328 2016-07-27 16:18:58 +08:00 committed by GitHub
commit 748eaa849e

View File

@ -88,14 +88,14 @@ func (a {{{classname}}}) {{{nickname}}}({{#allParams}}{{paramName}} {{{dataType}
var collectionFormat = "{{#collectionFormat}}{{collectionFormat}}{{/collectionFormat}}"
if collectionFormat == "multi" {
for _, value := range {{paramName}} {
queryParams.Add("{{paramName}}", value)
queryParams.Add("{{baseName}}", value)
}
} else {
queryParams.Add("{{paramName}}", a.Configuration.APIClient.ParameterToString({{paramName}}, collectionFormat))
queryParams.Add("{{baseName}}", a.Configuration.APIClient.ParameterToString({{paramName}}, collectionFormat))
}
{{/isListContainer}}
{{^isListContainer}}
queryParams.Add("{{paramName}}", a.Configuration.APIClient.ParameterToString({{paramName}}, ""))
queryParams.Add("{{baseName}}", a.Configuration.APIClient.ParameterToString({{paramName}}, ""))
{{/isListContainer}}
{{/queryParams}}{{/hasQueryParams}}