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
  • #1567
Closed
Open
Issue created Nov 29, 2018 by William Cheng@wing328Contributor

[OpenAPI Generator Online] requests for server code generation return https://localhost

Description

Example:

$ curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' https://api.openapi-generator.tech/api/gen/servers/python-flask
{"code":"00932bd5-9530-4115-851b-d5cc878060fd","link":"http://localhost:8080/api/gen/download/00932bd5-9530-4115-851b-d5cc878060fd"}%

http://localhost is used instead of http://api.openapi-generator.tech specifed in the environment variable.

$ curl -X POST -H "content-type:application/json" -d '{"openAPIUrl":"https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/2_0/petstore.yaml"}' https://api.openapi-generator.tech/api/gen/clients/ruby
{"code":"4275339e-5bd2-4dfe-b943-f39d71510cb1","link":"http://api.openapi-generator.tech/api/gen/download/4275339e-5bd2-4dfe-b943-f39d71510cb1"}

Ref: https://github.com/Mermade/openapi-gui/issues/36#issuecomment-442722796

openapi-generator version

Latest master

Suggest a fix/enhancement

A good starting point is to look at how /api/gen/clients/ruby process the request and use the environment variable in the result URL

Assignee
Assign to
Time tracking