-
-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - Generation Error in V.2.10.0 #758
Comments
Same problem here |
Seems to be Windows specific? |
maybe, I'm also on windows |
I'm on windows too |
Same issue on Windows |
As a workaround, please rollback to 2.9.0 for the time being. |
i can understand the problem but unfortunately i can't reproduce it in my windows environment. |
@kemotx90 can u give me please more information about your environment? here is an output of mine with v2.10.0 with 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 #
################################################################################ |
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. |
to pinpoint it a little bit, i think that |
@wing328 I think without a windows build workflow it is difficult to determine whether it runs under windows. branch: also i have added a i need an understanding of the following test: the last 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. |
i think i have it
fix is in 15ac43e but because it is not enough there is another problem |
thanks @mok-liee I'll revert the change for the time being. |
reverted, please install the latest release: https://github.com/OpenAPITools/openapi-generator-cli/releases/tag/v2.11.0 |
🐛 Bug Report:
The generation of file from this configuration has broken in V2.10.0 (but worked fine in V.2.9.0 or previous)
When run from CLI
get this error
If i'm rollback to 2.9.0 all work fine
The text was updated successfully, but these errors were encountered: