Skip to content

Goclient fix read close#7013

Closed
gmtstephane wants to merge 2 commits intoOpenAPITools:masterfrom
gmtstephane:goclient-fixreadClose
Closed

Goclient fix read close#7013
gmtstephane wants to merge 2 commits intoOpenAPITools:masterfrom
gmtstephane:goclient-fixreadClose

Conversation

@gmtstephane
Copy link
Contributor

@gmtstephane gmtstephane commented Jul 22, 2020

With the generated go client, the body response is read and closed inside the function, which is not returned. It is impossible to get the body from the returned value.
I suggest to not close the body and let the user do it with the returned value.

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project beforehand.
  • Run the shell script ./bin/generate-samples.shto update all Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master. These must match the expectations made by your contribution. You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*. For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

@gmtstephane
Copy link
Contributor Author

@antihax (2017/11) @grokify (2018/07) @kemokemo (2018/09) @bkabrda (2019/07)

@wing328
Copy link
Member

wing328 commented Jul 24, 2020

Thanks for the PR but your commit (as shown in the Commits tab) is not linked to your Github account, which means this PR won't count as your contribution in https://github.com/OpenAPITools/openapi-generator/graphs/contributors.

Let me know if you need help fixing it.

Ref: https://github.com/OpenAPITools/openapi-generator/wiki/FAQ#how-can-i-update-commits-that-are-not-linked-to-my-github-account

@gmtstephane
Copy link
Contributor Author

Im a sorry,
I created a new PR : #7041
I hope its ok now , i used the stackoverflow fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants