forked from loafle/openapi-generator-original
Add isSkipOperationExample check before generating op.requestBodyExamples in the DefaultCodeGe. This avoids the running out of heap space error one gets when generating a large spec file (#11144)
Co-authored-by: Kristopher Tadlock <tadlockk@infintech.com>
This commit is contained in:
parent
2db3e6bb25
commit
a20cee3024
@ -4103,7 +4103,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// add example
|
// add example
|
||||||
if (schemas != null) {
|
if (schemas != null && !isSkipOperationExample()) {
|
||||||
op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType);
|
op.requestBodyExamples = new ExampleGenerator(schemas, this.openAPI).generate(null, new ArrayList<>(getConsumesInfo(this.openAPI, operation)), bodyParam.baseType);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user