openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[BUG][JAVA] Exception in thread "main" java.lang.OutOfMemoryError: UTF16 String size is 1171739252, should be less than 1073741823

Open mthomas-github opened this issue 1 year ago • 1 comments

Bug Report Checklist

  • [x] Have you provided a full/minimal spec to reproduce the issue?
  • [X] Have you validated the input using an OpenAPI validator (example)?
  • [x] Have you tested with the latest master to confirm the issue still exists?
  • [X] Have you searched for related issues/PRs?
  • [X] What's the actual output vs expected output?
  • [ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description

I'm just trying to run Open Spec from docusign (https://github.com/docusign/OpenAPI-Specifications/raw/master/esignature.rest.swagger-v2.1.json) getting the following error

image

openapi-generator version

image

OpenAPI declaration file content or url

DocuSign Swwagger Generated d

Generation Details

I have a server with 160GB of Ram, it doesn't make a difference get same error each time, I tried with bash and java jar same approach

openapi-generator-cli generate -i https://github.com/docusign/OpenAPI-Specifications/raw/master/esignature.rest.swagger-v2.1.json -g csharp -o out
Steps to reproduce

Run command above

mthomas-github avatar May 06 '24 17:05 mthomas-github

please use skipOperationExample (global option). the below works for me.

e.g.

java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -g java -i https://raw.githubusercontent.com/docusign/OpenAPI-Specifications/master/esignature.rest.swagger-v2.1.json -o /tmp/docusign/ --skip-operation-example

wing328 avatar May 07 '24 10:05 wing328

Thanks,i tested and it worked

mthomas-github avatar May 07 '24 17:05 mthomas-github