-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG][JAVA][RestTemplate] Specified Accept header values generates uncompilable code #4222
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
Looks like this can be fixed by prefixing the variable name with I wonder if you've time to file a PR with the suggested fix. |
Any update on this issue? |
I just ran into the same problem. |
@fermartel @ogerardin |
Thanks for the fix by @mikesaurus Please pull the latest master or snapshot to give it a try. |
Description
openapi-generator version
4.1.0, 4.1.3
OpenAPI declaration file content or url
See the attached swagger contract for the full example.
Command line used for generation
swagger-client-config.json:
java -jar ./codegen.jar generate -c ./swagger-client-config.json -i ./swagger.json -g java -o client/
Steps to reproduce
You'll see the following error when Maven tries to compile:
There is already a local variable in the method named
accept
, so adding the accept header as an argument to the method creates the conflict.The text was updated successfully, but these errors were encountered: