Skip to content

Commit 81a3488

Browse files
fixed Bean Validation pattern (#19748)
1 parent 08da0ab commit 81a3488

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/openapi-generator/src/main/resources/Java/libraries/microprofile/beanValidationCore.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{!
1+
{{^isUuid}}{{#pattern}} @Pattern(regexp="{{{.}}}"){{/pattern}}{{!
22
minLength && maxLength set
33
}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{!
44
minLength set, maxLength not
@@ -17,4 +17,4 @@ isInteger set
1717
isLong set
1818
}}{{#isLong}}{{#minimum}} @Min({{.}}L){{/minimum}}{{#maximum}} @Max({{.}}L){{/maximum}}{{/isLong}}{{!
1919
Not Integer, not Long => we have a decimal value!
20-
}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}}
20+
}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{.}}"){{/minimum}}{{#maximum}} @DecimalMax("{{.}}"){{/maximum}}{{/isLong}}{{/isInteger}}{{/isUuid}}

0 commit comments

Comments
 (0)