Skip to content
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

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

Open
bogdanul2003 opened this issue Mar 5, 2025 · 0 comments

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

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

No branches or pull requests

1 participant