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

Add support for @JsonView #1112

Merged
merged 1 commit into from Jul 15, 2023
Merged

Conversation

altro3
Copy link
Collaborator

@altro3 altro3 commented Jul 13, 2023

Fixes #797

jsonViewClasses.add(value.getName());
}

return jsonViewClasses;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you can just call String[] classNames = element.getAnnotationMetadata().stringValues()

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

}
}

return false;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can probably just call visitContext.getClassElement(fieldJsonViewClassName) to get the JsonViewClass and then just use isAssignable instead of manually traversing the class hierarchy? Seems like you have just reimplemented an assignment check

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@altro3 altro3 merged commit cc796ab into micronaut-projects:4.10.x Jul 15, 2023
5 of 6 checks passed
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

Successfully merging this pull request may close these issues.

None yet

2 participants