Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit cad937a

Browse files
authored
Support for Bean Validation 2.0 (#192)
1 parent 7303c92 commit cad937a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

spring-auto-restdocs-core/src/main/java/capital/scalable/restdocs/constraints/SkippableConstraintResolver.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@
2929
class SkippableConstraintResolver implements MethodParameterConstraintResolver {
3030
public static final Collection<String> MANDATORY_VALUE_ANNOTATIONS = Arrays.asList(
3131
"javax.validation.constraints.NotNull",
32-
"org.hibernate.validator.constraints.NotBlank",
33-
"org.hibernate.validator.constraints.NotEmpty");
32+
"javax.validation.constraints.NotBlank", // since Bean Validation 2.0
33+
"javax.validation.constraints.NotEmpty", // since Bean Validation 2.0
34+
"org.hibernate.validator.constraints.NotBlank", // Hibernate Validator before 6.0
35+
"org.hibernate.validator.constraints.NotEmpty"); // Hibernate Validator before 6.0
3436

3537
private final MethodParameterConstraintResolver delegate;
3638
private final GroupDescriptionResolver descriptionResolver;

0 commit comments

Comments
 (0)