Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Issues
  • #2943
Closed
Open
Issue created May 20, 2019 by Administrator@rootContributor

[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

Assignee
Assign to
Time tracking