OpenAPITools / OpenAPITools/openapi-generator-cli

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

オープン
#690 コメント 21 件 リアクション 15 件 担当者 1 名 GitHub で見る

@kay-schecker がすでに取り組んでいます。

2023年3月3日 から。

bug
主要言語
TypeScript
スター
2k
フォーク
208
平均マージ
7時間 12分
マージ済み PR(30日)
6

説明

🐛 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.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。