OpenAPITools / OpenAPITools/openapi-generator-cli
[BUG] "Required option '-i' is missing"
@kay-schecker y travaille déjà.
Depuis le 3/3/2023.
- Langage dominant
- TypeScript
- Étoiles
- 2k
- Forks
- 208
- Merge moyen
- 7 h 12 min
- PR mergées (30 j)
- 6
Description
🐛 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.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Évaluation
Cette issue n'a pas encore été évaluée.