[BUG][Golang][Client] Configured Scheme is ignored by generated methods
Created by: johanbrandhorst
Description
The Go client library takes a configurable Scheme
, but it then doesn't use it when making client requests.
openapi-generator version
v4.0.0
via https://hub.docker.com/r/openapitools/openapi-generator-cli/
Command line used for generation
docker run --rm -v $(pwd):/local openapitools/openapi-generator-cli:v4.0.0 generate --package-name api -i /local/swagger.json -g go -o /local/api
Steps to reproduce
Attempt to make a request using a Go client generated with v4.0.0
.
Related issues/PRs
None
Suggest a fix
This should be reasonably easy to fix, simply adding a case for the Scheme like there is for the host in prepareRequest
:
https://github.com/OpenAPITools/openapi-generator/blob/18b66ed28c7a2c783e7c4e3c81f1817ec3cabf4f/modules/openapi-generator/src/main/resources/go/client.mustache#L278