Skip to content

[BUG] Autowired annotation not guarded by generateClientAsBean for java restclient #20808

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bogdanul2003 opened this issue Mar 5, 2025 · 1 comment · Fixed by #21198
Closed

Comments

@bogdanul2003
Copy link

Description

@Autowired constructor annotation is still present in the generated api class even if generateClientAsBean is set to false. Is this intended or can be removed from the mustache file?
https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/restclient/api.mustache#L47

This is properly guarded in resttemplate mustache file https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/Java/libraries/resttemplate/api.mustache#L47

openapi-generator version

openapi-generator version 7.12.0

@wing328
Copy link
Member

wing328 commented May 15, 2025

thanks for the fix (#21198) by @ondrej-simon

we just merged it. please pull the latest master to give it a try

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants