-
-
Notifications
You must be signed in to change notification settings - Fork 337
Open
Description
Allow using one view as input and a different view of the same DTO as output to a method.
Like this :
@POST
@Path("/add")
@JsonView(parameter=ExempleViews.Ajout.class, return=ExempleViews.Response.class) // <-- like this
@APIResponse(responseCode = "201", description = "Add with success")
@APIResponse(responseCode = "400", description = "Bad request")
@APIResponse(responseCode = "409", description = "Conflict in database")
@APIResponse(responseCode = "500", description = "Internal error")
public Uni<Response> add(@Valid @NotNull ExampleDto exampleDto) {
return exampleService
.add(exampleDto)
.map(e -> Response.ok(e).status(Status.CREATED).build());
}
Metadata
Metadata
Assignees
Labels
No labels