OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
[ ] [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
We tracked down a memory leak from the generated api client in kotlin.
The okhttp3.Response is closeable and isn't closed. This commit shows the fix we did on our end that addressed the leak.
openapi-generator version
We were using 0.6.2, we migrated to 7.6.0however, looking at the generated code, I believe the issue remains.
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Generate a kotlin client, keep on calling any requests, see memory usage keeps going up.
Bug Report Checklist
Description
We tracked down a memory leak from the generated api client in kotlin. The
okhttp3.Response
is closeable and isn't closed. This commit shows the fix we did on our end that addressed the leak.openapi-generator version
We were using
0.6.2
, we migrated to7.6.0
however, looking at the generated code, I believe the issue remains.OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Generate a kotlin client, keep on calling any requests, see memory usage keeps going up.
Related issues/PRs
Suggest a fix
Suggested fix: https://github.com/OpenAPITools/openapi-generator/pull/18997