We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 179bd2a + e88dc24 commit a35ca36Copy full SHA for a35ca36
modules/swagger-codegen/src/main/resources/go/api.mustache
@@ -149,8 +149,11 @@ func (a *{{{classname}}}Service) {{{nickname}}}(ctx context.Context{{#hasParams}
149
{{#hasFormParams}}
150
{{#formParams}}
151
{{#isFile}}
152
- var localVarFile {{dataType}}
+{{#required}}
153
+ localVarFile := {{paramName}}
154
+{{/required}}
155
{{^required}}
156
+ var localVarFile {{dataType}}
157
if localVarOptionals != nil && localVarOptionals.{{vendorExtensions.x-exportParamName}}.IsSet() {
158
localVarFileOk := false
159
localVarFile, localVarFileOk = localVarOptionals.{{vendorExtensions.x-exportParamName}}.Value().({{dataType}})
0 commit comments