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 #1209

Merged
merged 1 commit into from
Aug 8, 2022

Conversation

MikeEdgar
Copy link
Member

@MikeEdgar MikeEdgar commented Aug 7, 2022

Closes #1008

When endpoints responses and request bodies are found with @JsonView, the schema tree generated from the scan will include the name(s) of the views that were applied to the request/response. For cases where a nested bean should not be different between the views, the user may annotate a field with @Schema(ref = "<NameOfCommonSchema>").

Users will likely want to set mp.openapi.extensions.smallrye.remove-unused-schemas.enable to true.

@MikeEdgar MikeEdgar added this to the 3.1.0 milestone Aug 7, 2022
@MikeEdgar MikeEdgar added the backport/2.x Issue pending backport to the 2.x series label Aug 7, 2022
Closes smallrye#1008

Signed-off-by: Michael Edgar <michael@xlate.io>
@MikeEdgar MikeEdgar force-pushed the issue-1008-jsonview branch from 5a3f956 to 83a6447 Compare August 8, 2022 11:00
@MikeEdgar MikeEdgar changed the title WIP: Add support for @JsonView Add support for @JsonView Aug 8, 2022
@MikeEdgar MikeEdgar marked this pull request as ready for review August 8, 2022 11:29
@phillip-kruger
Copy link
Member

Thanks @MikeEdgar !

@phillip-kruger phillip-kruger merged commit 0a1870f into smallrye:main Aug 8, 2022
@MikeEdgar MikeEdgar deleted the issue-1008-jsonview branch August 8, 2022 23:48
@MikeEdgar MikeEdgar removed the backport/2.x Issue pending backport to the 2.x series label Aug 9, 2022
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.

Add support for @JsonView annotations
2 participants