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
I have an OpenAPI spec for which I can build a working Python client without errors using npx openapi-generator-cli generate. In our bigger project setup we use the Gradle plugin to generate a variety of clients for our API. In this setting, the generated Python client is exactly the same as the NPX CLI version, except for a syntax error due to a missing newline (see example below).
The spec given here is a minimal example, but for a bigger spec the error repeats itself across all API operation methods, i.e. wherever the response_data = .. statement appears. The client built using NPX does not have this issue.
Bug Report Checklist
Description
I have an OpenAPI spec for which I can build a working Python client without errors using
npx openapi-generator-cli generate
. In our bigger project setup we use the Gradle plugin to generate a variety of clients for our API. In this setting, the generated Python client is exactly the same as the NPX CLI version, except for a syntax error due to a missing newline (see example below).The spec given here is a minimal example, but for a bigger spec the error repeats itself across all API operation methods, i.e. wherever the
response_data = ..
statement appears. The client built using NPX does not have this issue.openapi-generator version
7.8.0
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Build Python client based on above specs using the OpenAPI Generator Gradle plugin.
Related issues/PRs
No related issues found.
Suggest a fix
Clueless as to why this happens with the Gradle plugin. Any help is much appreciated!