-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Go] 2.3.0 undefined: localVarFile
problem in multipart/form-data file
#7311
Milestone
Comments
4 tasks
4 tasks
it is still actual for me too |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The auto-generated function parameter name for a file is set to the file's
parameter
name
property while the code within the function expectslocalVarFile
. This occurs in amultipart/form-data
request with the typefile
parameter.Swagger-codegen version
2.3.0
Swagger declaration file content or url
The following file property:
https://github.com/grokify/ringcentral-sdk-go-scg/blob/master/codegen/swagger_ringcentral_v1.0.32.json#L4291
Results in:
Renaming
body
tolocalVarFile
fixes the issue in multiple instances.Command line used for generation
$ java -jar swagger-codegen-cli.jar generate -c swagger_ringcentral_config.json -i swagger_ringcentral_v1.0.32.json -l go -o .
Steps to reproduce
Build the SDK, run this example code:
https://github.com/grokify/go-ringcentral/blob/master/examples/get_me/get_me.go
Related issues/PRs
grokify/go-ringcentral-client#4
Suggest a fix/enhancement
In the RingCentral SDK, this is manifested using the
body
,attachment
, andimage
parameter names. Renaming all of these tolocalVarFile
solves the issues when the property type isfile
.The text was updated successfully, but these errors were encountered: