@JsonUnwrapped with hibernate validator


First, sorry I know that @JsonUnwrapped is not owned by, hibernate, but I’m trying to make @JsonUnwrapped works seamlessly with hibernate validator. Example:

I have this:

public class Request {

  public Test test;

public class Test {

  public String value;

When validated, I have:
interpolatedMessage=‘must not be null’

I would like to have propertyPath=value and not propertyPath=test.value. Any idea how to achieve that?