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

Jackson @JsonView serialization/deserialization support for rest clients #35909

Open
xuanshenbo opened this issue Sep 13, 2023 · 2 comments
Open
Labels
area/jackson Issues related to Jackson (JSON library) area/rest-client kind/enhancement New feature or request

Comments

@xuanshenbo
Copy link

xuanshenbo commented Sep 13, 2023

Description

Quarkus already supports @JsonView for response bodies on the rest server. The same can also be applied to response and request bodies for rest clients.

@Path("/user")
@RegisterRestClient
public interface UserClient {
    @Path("/{id}")
    @GET
    @JsonView(Views.Public.class)
    User getUser(@RestPath UUID id);
    
    @POST
    Response createUser(@JsonView(Views.Public.class) User user);
}

This feature is related to #35871

Implementation ideas

No response

@xuanshenbo xuanshenbo added the kind/enhancement New feature or request label Sep 13, 2023
@quarkus-bot quarkus-bot bot added area/jackson Issues related to Jackson (JSON library) area/rest-client labels Sep 13, 2023
@quarkus-bot
Copy link

quarkus-bot bot commented Sep 13, 2023

/cc @cescoffier (rest-client), @geoand (jackson,rest-client), @gsmet (jackson)

@manofthepeace
Copy link
Contributor

That would be nice. For the moment I have a custom objectmapper to achieve that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/jackson Issues related to Jackson (JSON library) area/rest-client kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants