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
  • #3288
Something went wrong while setting issue due date.
Closed
Open
Issue created 6 years ago by Jim Schubert@jimschubertContributor5 of 6 checklist items completed5/6 checklist items
  • New related issue

  • Report abuse to administrator

  • New related issue

  • Report abuse to administrator

[BUG] openapi-generator-online require environment variable to define scheme/host/port in generated download links

Closed

[BUG] openapi-generator-online require environment variable to define scheme/host/port in generated download links

Bug Report Checklist

  • Have you provided a full/minimal spec to reproduce the issue?
  • Have you validated the input using an OpenAPI validator (example)?
  • What's the version of OpenAPI Generator used?
  • Have you search for related issues/PRs?
  • What's the actual output vs expected output?
  • [Optional] Bounty to sponsor the fix (example)
Description

The GENERATOR_HOST environment variable in openapi-generator-online isn't necessary and can't accurately be set in some cases.

openapi-generator version

all?

OpenAPI declaration file content or url
Command line used for generation

n/a

Steps to reproduce
  • Start a docker image and bind all exposed ports to random ports on the host:
docker run -it -P --rm openapitools/openapi-generator-online:v4.0.2
  • Observe: GENERATOR_HOST would need to be passed at docker run, which isn't possible when docker randomizes port assignments. See
image
Related issues/PRs

#3287

Suggest a fix

Remove GENERATOR_HOST and pull scheme/host/port from request details.

GENERATOR_HOST itself adds some other complexity, for example if a single nginx configuration is used to proxy multiple addresses to the same instance of the service (e.g. api.example.com, example.com, and latest.example.com could point to the same service via single nginx configuration, but would all require separate processes due to GENERATOR_HOST.

Tasks
0
server returned results with length 5, expected length of 9

Linked items
0

Link issues together to show that they're related. Learn more.

Activity


Please register or sign in to reply
0 Assignees
None
Assign to
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
Due date
None
None
None
Time tracking
No estimate or time spent
Confidentiality
Not confidential
Not confidential

You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

Lock issue
Unlocked
0
0 participants
Reference: