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
  • #6195
Closed
Open
Issue created May 06, 2020 by Administrator@rootContributor

[REQ] Feature Request Description

Created by: rulrok

Is your feature request related to a problem? Please describe.

When generating the server stub code, I'd like the port to follow the port described on my yaml file.

My servers declaration is as follow:

servers:
  - url: http://{sub}localhost:8081
    description: Localhost
    variables:
      sub:
        enum:
          - malbork.
          - viccinni.
        default: malbork.

I'm generating a node express server with

npx openapi-generator generate -i openapi.yaml -g nodejs-express-server -o ./fake-api-express

But the generated server runs on port 3000 by default.

Describe the solution you'd like

It'd be nice if it could detect my localhost:8081 setting and use 8081 by default as its port configuration.

Describe alternatives you've considered

For now, I guess I can generate the code onde and put the config.js at .openapi-generator-ignore

Additional context

Assignee
Assign to
Time tracking