Skip to content

Support annotations on generated classes #12

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

Open
krissrex opened this issue Jul 1, 2022 · 4 comments
Open

Support annotations on generated classes #12

krissrex opened this issue Jul 1, 2022 · 4 comments

Comments

@krissrex
Copy link

krissrex commented Jul 1, 2022

It would be useful to support annotating the generated classes, like you already support markerInterface.

I would like to apply a list of annotations, like @kotlinx.serialization.Serializable and @javax.annotation.processing.Generated

@pwall567
Copy link
Owner

pwall567 commented Jul 3, 2022

Hi, thanks for the suggestion. I had previously mentioned to others that I was thinking of doing something like this, and they mostly responded positively to the idea. So I guess your comment adds further weight to the proposal.

I've already given the idea some thought so it shouldn't take too long. I'll respond again here when I have something to show.

@pwall567
Copy link
Owner

You may be interested to know that annotations are now available in version 0.82 of the code generator. The configuration is described in the Configuration Guide.

I hope this proves to be useful.

@noemielach
Copy link

Hi @pwall567, I tried following the example to add annotations to the generated classes but it's not working for me. Other configurations work as they should, but I can't manage to get annotations in my generated classes. Any idea why ?

@pwall567
Copy link
Owner

Hi @noemielach , can you provide more information? For example, a simple type definition and the code generated from it? (And of course the config you are using.)

The feature works for me – are you using the latest version? (0.82)

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

No branches or pull requests

3 participants