[BUG][JAVA] Exception in thread “main” java.lang.OutOfMemoryError: Java heap space

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?
  • Have you search for related issues/PRs?
  • What’s the actual output vs expected output?

Description

Trying to generate a quite large ~1mb Swagger-file. It had some validation issues, and I tried to fix them. Don’t know if those are relevant, since no matter if it’s fixed or not, no dice. Still «Java heap space» issue.

Relevant issue: bjerkio/tripletexjs#14
Reproduce the issue with this repository: github.com/bjerkio/tripletexjs/tree/reproduce

openapi-generator version

4.3.1

OpenAPI declaration file content or url

raw.githubusercontent.com/bjerkio/tripletexjs/reproduce/swagger-fixed.json

Command line used for generation

make generate or

java -Xmx4G -jar openapi-generator-cli.jar \
	generate \
	-i ./swagger-fixed.json \
	-g typescript-fetch \
	-o ./out -v
Steps to reproduce
> git clone git@github.com:bjerkio/tripletexjs.git
> git checkout reproduce
> make generate
Related issues/PRs
  • OpenAPITools/openapi-generator#2503
  • OpenAPITools/openapi-generator#4398
  • OpenAPITools/openapi-generator#5201.
Suggest a fix

I’m lost.

@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608 @bkabrda

Read more here: Source link