FasterXML / FasterXML/jackson-annotations
Use 2 different `@JsonView` in a method (parameter and return)
- Ngôn ngữ chính
- Java
- Star
- 1.1k
- Fork
- 342
- Merge trung bình
- 8 giờ 53 phút
- Pull request đã merge (30 ngày)
- 2
Mô tả
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 add(@Valid @NotNull ExampleDto exampleDto) {
return exampleService
.add(exampleDto)
.map(e -> Response.ok(e).status(Status.CREATED).build());
}
```
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.