Skip to content

Commit

Permalink
Merge pull request #10519 from swagger-api/issue-8641
Browse files Browse the repository at this point in the history
added @Valid annotation on bean validation template for java jaxs
  • Loading branch information
HugoMario authored Oct 22, 2020
2 parents 533f668 + 1ea0c79 commit 12dbb1c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{{#required}}
@NotNull
{{/required}}
{{#isContainer}}
{{^isPrimitiveType}}
{{^isEnum}}
@Valid
{{/isEnum}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isNotContainer}}
{{^isPrimitiveType}}
@Valid
{{/isPrimitiveType}}
{{/isNotContainer}}
{{>beanValidationCore}}
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
{{#required}}
@NotNull
{{/required}}
{{#isContainer}}
{{^isPrimitiveType}}
{{^isEnum}}
@Valid
{{/isEnum}}
{{/isPrimitiveType}}
{{/isContainer}}
{{#isNotContainer}}
{{^isPrimitiveType}}
@Valid
{{/isPrimitiveType}}
{{/isNotContainer}}
{{>beanValidationCore}}
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import java.io.Serializable;
{{/serializableModel}}
{{#useBeanValidation}}
import javax.validation.constraints.*;
import javax.validation.Valid;
{{/useBeanValidation}}

{{#models}}
Expand Down

0 comments on commit 12dbb1c

Please sign in to comment.