Comments (15)
thanks for reporting the issue.
@mok-liee can you please take a look when you've time?
related PR: #756
from openapi-generator-cli.
reverted, please install the latest release: https://github.com/OpenAPITools/openapi-generator-cli/releases/tag/v2.11.0
from openapi-generator-cli.
Same problem here
from openapi-generator-cli.
Seems to be Windows specific?
from openapi-generator-cli.
Seems to be Windows specific?
maybe, I'm also on windows
from openapi-generator-cli.
I'm on windows too
from openapi-generator-cli.
Same issue on Windows
from openapi-generator-cli.
As a workaround, please rollback to 2.9.0 for the time being.
from openapi-generator-cli.
i can understand the problem but unfortunately i can't reproduce it in my windows environment.
but i think that using path.join
should solve the problem. sorry for that
from openapi-generator-cli.
@kemotx90 can u give me please more information about your environment?
version of windows, node, npm/yarn, java and the output of echo %JAVA_HOME%
would be helpful.
here is an output of mine with v2.10.0 with cmd
. almost the same result with git-bash
.
Microsoft Windows [Version 10.0.22631.3235]
(c) Microsoft Corporation. Alle Rechte vorbehalten.
C:\***\oa-demo>echo %JAVA_HOME%
C:\Program Files\Eclipse Adoptium\jdk-17.0.10.7-hotspot\
C:\***\oa-demo>node -v
v18.17.0
C:\***\oa-demo>npm -v
9.6.7
C:\***\oa-demo>npm init -y
Wrote to C:\***\oa-demo\package.json:
{
"name": "oa-demo",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC"
}
C:\***\oa-demo>npm install @openapitools/openapi-generator-cli
added 112 packages, and audited 113 packages in 17s
23 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
// package.json
...
"dependencies": {
"@openapitools/openapi-generator-cli": "^2.10.0"
}
...
C:\***\oa-demo>.\node_modules\.bin\openapi-generator-cli generate -g ruby -i https://raw.githubusercontent.com/OpenAPITools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -o .\out\ruby
Download 7.3.0 ...
Downloaded 7.3.0
Did set selected version to 7.3.0
[main] INFO o.o.codegen.DefaultGenerator - Generating with dryRun=false
[main] INFO o.o.c.ignore.CodegenIgnoreProcessor - Output directory (C:\***\oa-demo\.\out\ruby) does not exist, or is inaccessible. No file (.openapi-generator-ignore) will be evaluated.
[main] INFO o.o.codegen.DefaultGenerator - OpenAPI Generator: ruby (client)
[main] INFO o.o.codegen.DefaultGenerator - Generator 'ruby' is considered stable.
[main] INFO o.o.c.languages.AbstractRubyCodegen - Hint: Environment variable 'RUBY_POST_PROCESS_FILE' (optional) not defined. E.g. to format the source code, please try 'export RUBY_POST_PROCESS_FILE="/usr/local/bin/rubocop -a"' (Linux/Mac)
[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as updatePetWithForm_request. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings updatePetWithForm_request=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings updatePetWithForm_request=NewModel,ModelA=NewModelA in CLI).
[main] INFO o.o.codegen.InlineModelResolver - Inline schema created as uploadFile_request. To have complete control of the model name, set the `title` field or use the modelNameMapping option (e.g. --model-name-mappings uploadFile_request=NewModel,ModelA=NewModelA in CLI) or inlineSchemaNameMapping option (--inline-schema-name-mappings uploadFile_request=NewModel,ModelA=NewModelA in CLI).
[main] INFO o.o.codegen.DefaultGenerator - Model updatePetWithForm_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO o.o.codegen.DefaultGenerator - Model uploadFile_request not generated since it's marked as unused (due to form parameters) and `skipFormModel` (global property) set to true (default)
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\models\api_response.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\models\api_response_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\ApiResponse.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\models\category.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\models\category_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\Category.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\models\order.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\models\order_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\Order.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\models\pet.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\models\pet_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\Pet.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\models\tag.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\models\tag_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\Tag.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\models\user.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\models\user_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\User.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\api\pet_api.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\api\pet_api_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\PetApi.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\api\store_api.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\api\store_api_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\StoreApi.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\api\user_api.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\api\user_api_spec.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\docs\UserApi.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\api_error.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\version.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\README.md
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\git_push.sh
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.gitignore
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\Rakefile
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\Gemfile
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.rubocop.yml
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.travis.yml
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.gitlab-ci.yml
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\openapi_client.gemspec
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\configuration.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\lib\openapi_client\api_client.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.rspec
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\spec\spec_helper.rb
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.openapi-generator-ignore
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.openapi-generator\VERSION
[main] INFO o.o.codegen.TemplateManager - writing file C:\***\oa-demo\.\out\ruby\.openapi-generator\FILES
################################################################################
# Thanks for using OpenAPI Generator. #
# Please consider donation to help us maintain this project ? #
# https://opencollective.com/openapi_generator/donate #
################################################################################
from openapi-generator-cli.
okay, i can reproduce it now. it seems to behave differently if you start the generation via the openapitools.json. i'll take a look at it.
from openapi-generator-cli.
to pinpoint it a little bit, i think that concurrently
doesn't like how the command is passed
from openapi-generator-cli.
@wing328 I think without a windows build workflow it is difficult to determine whether it runs under windows.
except for one test, i have been able to recreate the build plan for windows.
branch:
https://github.com/mok-liee/openapi-generator-cli/tree/feature/add-windows-to-build
compare:
mok-liee/openapi-generator-cli@patch-2...mok-liee:openapi-generator-cli:feature/add-windows-to-build
also i have added a generate
test with JAVA_HOME
(it was the default) and now without.
i need an understanding of the following test:
npm run oa:generate && mkdir ./foo && cd ./foo && npm run oa:generate
the last npm run oa:generate
, is it correct that the generate
command must find the openapitools.json
in the parent folder?
if this is the case, i unfortunately cannot find where this logic is located. can you help me?
here you can see (i hope) my last build https://github.com/mok-liee/openapi-generator-cli/actions/runs/8164577233/job/22320124191
windows does not seem to look in the parent folder.
i think this could be the last step to get this thing running.
from openapi-generator-cli.
i think i have it
process.env.PWD
returns on Unix the parent directory and under Windows nothing
process.env.INIT_CWD
returns on both the foo
directory
process.cwd()
returns on both the parent directory
fix is in 15ac43e but because it is not enough there is another problem
https://github.com/mok-liee/openapi-generator-cli/actions/runs/8165673935/job/22323245537
i will continue the days
from openapi-generator-cli.
thanks @mok-liee I'll revert the change for the time being.
from openapi-generator-cli.
Related Issues (20)
- [BUG] - How to generate code for specific tag/path? specifying `--globalProperty=apis=user` is not working.
- [BUG] Unable to query repository becasuse of: "Socket connection timeout" in MacOS HOT 2
- Rename default service generate
- Failed to run the command for setting the version `openapi-generator-cli version-manager set 5.3.0`
- [BUG] HTTP_PROXY Support No Longer Works HOT 6
- [BUG] Axios package <1.6.0 vulnerability HOT 3
- [BUG] useDocker is not passing the user and group when running through the passthrough service HOT 2
- [BUG] version-manager doesn't work since search.maven.org redirects to central.sonatype.com HOT 2
- [BUG] axios version lesser than 1.6.0 has Cross-Site Request Forgery vulnerability HOT 20
- [UPDATE] Release 7.1.0 HOT 4
- [BUG] cant run docker-entrypoint.sh anymore | bash missing :( HOT 2
- [BUG] openapi-generator-cli throw java runtime error in any directory, except installed project HOT 2
- openapi-generator-cli 7.1.0 has errno: -9, code: EBADF [BUG]
- Commercial issues
- [BUG] Version manager sets different version in different folders in Docker
- openapi-generator-cli couldn't list installed versions HOT 6
- Cannot read propertie of undefined (reading 'action') HOT 2
- Add option to choose the location of openapitools.json
- NPM @openapitools/openapi-generator-cli package is not the latest HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openapi-generator-cli.