-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
How could I add custom annotation @Generator or other annotation to all class in Java #9752
Comments
I second this. Another use case is adding |
I also think this feature would be extremely useful and valuable.
|
Any updates on this? We are facing the same issue. |
Yep. I'd also be interested in a solution. |
For the record, there is a workaround which isn't pretty but does the job: maven-replacer-plugin. In order to add annotations (in this case: suppress warnings) you can proceed as follows:
I think we all agree that an "official way" to do this would be better, but at least this gets the job done. |
Description
I want to add custom annotation to all classes that is generated by openapi. Something like
@Generated
so Jacoco can exclude those classes. Currently generator does support adding annotation to model classes but I want to add it all the classes. I do see@javax.annotation.Generated
on all classes but the retention policy is SCOPE so jacoco is not able to exclude those classes from the report.Is there any functionality like this
additionalModelTypeAnnotations: '@lombok.Generated'
that supports adding annotations to all classes?The text was updated successfully, but these errors were encountered: