class NotEmptyConstraintValidationErrorDescriptorBuilder implements ValidationErrorDescriptorBuilder<NotEmpty> {

    @Override
    public ErrorDescriptor build(ConstraintViolation violation) {
        return new ErrorDescriptor().setErrorCode(DefaultConstraintAnnotation.getErrorCode(violation))
                .addProperties(new ClientProperty("propertyPath", violation.getPropertyPath().toString()))
                .setParameters(violation.getPropertyPath().toString());
    }

}