OpenAPITools / OpenAPITools/openapi-generator
[BUG] .openapi-generator/VERSION always says `unset` on windows (installed via npm)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used? 4.1.2
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
Description
On Windows, when installing openapi-generator via npm (or cloning it), the .openapi-generator/VERSION generated file always says unset instead of the actual version.
openapi-generator version
4.1.2 and master, but present since a while (at least, 4.1.0)
OpenAPI declaration file content or url
Any OpenAPI yml (e.g., modules\openapi-generator\src\test\resources\2_0\petstore.yaml)
Command line used for generation
.\bin\windows\kotlin-client-petstore.bat or .\bin\windows\swift4-petstore.bat
Steps to reproduce
npm install or git clone then run script
Expected output: the generated file .openapi-generator/VERSION should include the proper version number used (currently 4.1.2).
Actual output: the generated file .openapi-generator/VERSION includes unset
NOTE: This works as expected on macOS
Related issues/PRs
N/A
Suggest a fix
Make sure the windows version of the tool can detect its version reliably.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with npm install or git clone, then run bin/windows/kotlin-client-petstore.bat or bin/windows/swift4-petstore.bat using the referenced petstore.yaml. Trace how the Windows command-line tool determines its version and compare the generated .openapi-generator/VERSION with the expected 4.1.2 value; done means Windows reports the actual version rather than unset.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, node.js
- Domain
- cli, devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100