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

Processing ClassTypeDef separately in Annotation values #183

Merged

Conversation

elifKurtay
Copy link
Collaborator

Representing ClassTypeDef as a Class<> in the Annotation values.

Desired usage:

AnnotationDef.builder(ClassTypeDef.of("jackson.annotation.JsonSubTypes.Type"))
                .addMember("value", ClassTypeDef.of("Account"))
                .addMember("name", "string")
                .build()

This PR would generate:

@JsonSubTypes.Type(
            value = Account.class,
            name = "string"
        )

Base branch generates:

@JsonSubTypes.Type(
            value = ClassName[className=Account, nullable=false],
            name = "string"
        )

@dstepanov dstepanov merged commit 2a85128 into micronaut-projects:1.4.x Nov 11, 2024
6 checks passed
@elifKurtay elifKurtay deleted the annotation-value-addition branch November 13, 2024 16:32
@dstepanov dstepanov added the type: improvement A minor improvement to an existing feature label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: improvement A minor improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants