This repository was archived by the owner on May 28, 2018. It is now read-only.

Description
That would be a brilliant aggregate
@Value
@Builder(toBuilder = true)
@NoArgsConstructor(force = true)
@AllArgsConstructor
public class Changes {
@Context
Locale locale;
@HeaderParam("Authorization")
String token;
@QueryParam("rewrite")
String rewrite;
@PathParam("id")
String id;
@JsonProperty
@NotNull
@Valid
AddressDTO three;
}
Now AddressDTO is null, of course
so instead,
@POST
UserDTO dostuff(@BeanParam Changes changes, @NotNull @Valid UserDTO)
you could just
@POST
UserDTO dostuff(@BeanParam Changes changes)
and of course deep nesting would allow even more.
Especially with some libraries like mapstruct, where all that hierarchy automatically would be remapped to any other bunch of objects with possibly completely different topology. This would allow very convenient transitioning from web-specific layer data to , say, db/persistence layer.