Skip to content

[BUG] "Required option '-i' is missing" #690

Description

@RichardBradley

🐛 Bug Report:

Describe the bug

When I run npx openapi-generator-cli generate, I get the following error:

$ npx openapi-generator-cli genera
[error] Required option '-i' is missing

Steps to Reproduce

I'm on v 2.5.2 (latest at time of writing), Cygwin on Windows, Node 14. Here's all relevant info I can think of:

$ npx --version
6.14.17
$ npm --version
6.14.17
$ node --version
v14.20.0
$ npx openapi-generator-cli version
6.0.1
$ grep openapi-generator ../../package.json
    "@openapitools/openapi-generator-cli": "^2.5.2",
$ cat openapitools.json
{
  "$schema": "../../node_modules/@openapitools/openapi-generator-cli/config.schema.json",
  "spaces": 2,
  "generator-cli": {
    "version": "6.0.0",
    "generators": {
      "my-spec-gen": {
        "generatorName": "typescript-rxjs",
        "output": "./generated",
        "inputSpec": "./reference/my-spec.yaml"
      }
    }
  }
}
$ npx openapi-generator-cli generate
Download 6.0.1 ...
Downloaded 6.0.1
[error] Required option '-i' is missing

Expected behavior

openapi-generator-cli should invoke openapi-generator-cli with correct args in order to regenerate my models

Operation System (please complete the following information):

  • OS: Windows 10, Cygwin

Package System (please complete the following information):

npm 6.14.17, node v14.20.0

I get the same on Node 18

Additional context

This appears to be the same issue described in #43 that is marked fixed.

I was able to work around by invoking Java directly:

java -jar ../../node_modules/@openapitools/openapi-generator-cli/versions/6.0.1.jar generate -i ./reference/my-api.yaml -o generated -g typescript-rxjs

I can't see what's up with openapi-generator-cli or how to diagnose further. I wasn't able to get any diagnostic logs, and the main.js seems minified so I couldn't investigate further.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions