Skip to content

[REQ] Feature Request Description #6195

Open
@rulrok

Description

@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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions