OpenAPITools / OpenAPITools/openapi-generator

[BUG][python-flask] Large spec results in java.lang.OutOfMemoryError

Open
#5,665 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue: Bug Server: Python
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Description

When trying to generate a python-flask server from a spec with 5 paths and 83 classes., the generator crashes with java.lang.OutOfMemoryError and this output and stack trace:

openapi-generator version

Version: 4.2.3

OpenAPI declaration file content or url

Spec: https://gist.github.com/12d9c061c6217bca4d01a4edc19c4f01

Validation is ok

openapi-generator-cli validate -i openapi.yaml
Validating spec (openapi.yaml)
No validation issues detected.
Command line used for generation
openapi-generator-cli generate -i openapi.yaml -g python-flask
Steps to reproduce

Just run the above command.

Related issues/PRs

#5201
#4398

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked openapi.yaml spec and reproduce the failure using openapi-generator-cli generate -i openapi.yaml -g python-flask. Review the output and stack trace alongside related issues #5201 and #4398; done means this valid spec generates the python-flask server without java.lang.OutOfMemoryError.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, java, openapi, python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.