openapi-generator icon indicating copy to clipboard operation
openapi-generator copied to clipboard

[REQ] JVM code gen to use a @Genereated annotation that has at least CLASS retention so that coverage can be ignored

Open Johnlon opened this issue 1 year ago • 3 comments

Is your feature request related to a problem? Please describe.

Javaoco automatically ignores classes annotated as @Generated as long as the annotation persists into the class. Unfortunately the @Generated annotation is use only has SOURCE retention.

Describe the solution you'd like

Pick any @Generated annotation with CLASS and switch to that annotation. For backwards compatibility consider include this new annotation on top of the existing one you are using. It doesn't matter which CLASS level @Generated annotation you use so if you want just generate a @Generated annotation class in during the code gen.

Describe alternatives you've considered

Manually listing classes and setting specific config in the build is tedious.

Johnlon avatar Feb 09 '24 23:02 Johnlon

+1 on this request!

bjornw77 avatar Jun 11 '25 11:06 bjornw77

I suggest you add it yourself and raise a pr. I abandoned this code generator for many reasons (and design of this code gen product made fixing them too expensive)

Johnlon avatar Jun 11 '25 11:06 Johnlon

my suggestion is that if you need a java code gen then write it yourself and it will be perfect for.your needs. took me a couple of days to write a gradle script to achieve this. you don't need these cumbersome tools.

the tool has become convoluted and messy and hard to maintain , and the tests are pants too and even the main maintainer recognises the mess.

https://youtu.be/7Lke9dHRqT0?si=OXkK7lvrK68qPagl

the whole thing is unnecessarily complex.due to trying to be a framework and it's just not necessary imho

Johnlon avatar Jun 11 '25 11:06 Johnlon