You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
I can confirm the bug, after a fresh install of @openapitools/openapi-generator-cli": "^2.7.0" in the package.json and invoking it through npm run in a linux github codespace.
Also the openapitools.json is overwritten for me.
Installing it globally and using only the command line options worked for me (as a workaround)
I had the same issue while trying to run generate without arguments from within a subfolder of my project. I “fixed” it by putting my openapitools.json in the project root (the same level as my package.json) and adjusting my paths (inputSpec, output, config, etc.) relative to the project root.
After invoking the generator via a NPM script from my package.json, e.g.
To get the issue back on track: The problem is not that "-i is missing", but that the openapitools.json is simply ignored when running openapi-generator-cli generate --generator-key v1.0. (or openapi-generator-cli generate)
Im pretty sure of this, because when i specify -i manually the cmd complains about generator name as so on.. even tho they are all defined in the json.
Hi @wing328 thanks for the follow up. After much debugging I discovered that the same error is given if the openapitools.json file does not follow the openapi-generator-cli schema (I didn't have the generators within the generator object).
Its now working as expected on the latest release.
Hello @wing328,
My situation is similar to the one described on #690 (comment)
The difference is that in my windows environment the process.env.PWD is filled but it has the wrong project path, as showed below
I'm using npm to run "openapi-generator-cli generate" command
npm --version
npm verb cli C:\Users\lpinto\.nvs\default\node.exe C:\Users\lpinto\.nvs\default\node_modules\npm\bin\npm-cli.js
npm info using npm@9.6.7
npm info using node@v18.17.1
npm verb title npm
npm verb argv "--version"
npm verb logfile logs-max:10 dir:C:\Users\lpinto\AppData\Local\npm-cache\_logs\2024-03-25T08_16_04_423Z-
npm verb logfile C:\Users\lpinto\AppData\Local\npm-cache\_logs\2024-03-25T08_16_04_423Z-debug-0.log
9.6.7
npm verb exit 0
npm info ok
I found this comment #758 (comment), and I believe it could solve my situation.
Has a workaround I have to define all the configurations like this "openapi-generator-cli generate -i xx -g xxx -o xxx -c openapitools.json", but this way I am repeating the settings that exist within the openapitools.json file.
I think openapi-generator-cli should really just use process.cwd()... With INIT_CWD it seems to often gen invoked in the current directory even when running scripts recursively from a different folder. And PWD is essentially process.cwd() on Linux/macOS, but doesn't exist in Windows, which causes the behavior to vary...
Activity
DanielHabenicht commentedon Oct 14, 2023
I can confirm the bug, after a fresh install of
@openapitools/openapi-generator-cli": "^2.7.0"in the package.json and invoking it throughnpm runin a linux github codespace.Also the
openapitools.jsonis overwritten for me.Installing it globally and using only the command line options worked for me (as a workaround)
a-stangl commentedon Dec 4, 2023
I had the same issue while trying to run
generatewithout arguments from within a subfolder of my project. I “fixed” it by putting myopenapitools.jsonin the project root (the same level as mypackage.json) and adjusting my paths (inputSpec,output,config, etc.) relative to the project root.After invoking the generator via a NPM script from my
package.json, e.g.via
npm run generateall worked as expected.RobinMeow commentedon Dec 10, 2023
To get the issue back on track: The problem is not that "-i is missing", but that the
openapitools.jsonis simply ignored when runningopenapi-generator-cli generate --generator-key v1.0. (oropenapi-generator-cli generate)Im pretty sure of this, because when i specify -i manually the cmd complains about generator name as so on.. even tho they are all defined in the json.
RichardBradley commentedon Feb 8, 2024
This seems to have been fixed in the latest version.
It's no longer happening for me at any rate
wing328 commentedon Feb 8, 2024
thanks for the confirmation
just so you know we just released openapi-generator v7.3.0
Haarolean commentedon Feb 9, 2024
Experiencing this as well. Only on Windows.
provectus/kafka-ui#1582
Haarolean commentedon Feb 9, 2024
@wing328 it's not fixed in 7.3.0, just tried that out.
tajnymag commentedon Mar 11, 2024
Can confirm it still happens on 7.4.0
wing328 commentedon Mar 11, 2024
are you guys using Windows? are you using DOS prompt?
it works for me on Windows 11, JDK17 with DOS command prompt.
tajnymag commentedon Mar 11, 2024
Running both Windows 11 and JDK17.
Can reproduce in conhost too, but I mainly use pwsh in Windows Terminal. That doesn't seem to be the issue.
I'm probably in a wrong issue though, my issue is mainly related to this issue: #43.
I'm using pnpm and I'm calling the generator from a package.json script.
tajnymag commentedon Mar 11, 2024
Found the issue. At least in my case.
Openapi-generator-cli is using INIT_CWD as its working directory:
openapi-generator-cli/apps/generator-cli/src/app/services/config.service.ts
Line 10 in 7e43a4e
When I ran my pnpm test script from a different directory (
pnpm -rorpnpm run --dir) I got:There's an issue in pnpm discussing where INIT_CWD is supposed to point.
wing328 commentedon Mar 12, 2024
thanks for sharing the details.
as a workaround, please use npm instead.
wilml commentedon Mar 19, 2024
Hi @wing328 using npm (assuming below is what you meant) does not work. I tried the following,
And then ran,
Still same error,
Edit: Using version 7.4.0 on Ubuntu 22.04
wing328 commentedon Mar 20, 2024
the latest version of the npm wrapper allows you to specify the openapitools.json file. can you please give it a try?
#754
wilml commentedon Mar 20, 2024
Hi @wing328 thanks for the follow up. After much debugging I discovered that the same error is given if the
openapitools.jsonfile does not follow the openapi-generator-cli schema (I didn't have the generators within thegeneratorobject).Its now working as expected on the latest release.
lpinto-adn commentedon Mar 25, 2024
Hello @wing328,
My situation is similar to the one described on #690 (comment)
The difference is that in my windows environment the process.env.PWD is filled but it has the wrong project path, as showed below
I'm using npm to run "openapi-generator-cli generate" command
I found this comment #758 (comment), and I believe it could solve my situation.
Has a workaround I have to define all the configurations like this
"openapi-generator-cli generate -i xx -g xxx -o xxx -c openapitools.json", but this way I am repeating the settings that exist within the openapitools.json file.segevfiner commentedon Sep 24, 2024
I think openapi-generator-cli should really just use
process.cwd()... With INIT_CWD it seems to often gen invoked in the current directory even when running scripts recursively from a different folder. AndPWDis essentiallyprocess.cwd()on Linux/macOS, but doesn't exist in Windows, which causes the behavior to vary...PawelWesolowski commentedon Feb 11, 2025
I just got it because there was a formatting error in my config json file. Just FYI...
jacolineeckard07-tech commentedon Aug 10, 2026
I don't know of access was and is manipulated by cast or Bluetooth and or Network Wifi.

Maybe you can figure it out please
jacolineeckard07-tech commentedon Aug 10, 2026
jacolineeckard07-tech commentedon Aug 10, 2026
These are the apps on my phone and halve of it I don't know