Skip to content

Commit

Permalink
Fix Email annotation; copied from ootb spring boot templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjasper committed Feb 14, 2024
1 parent 2dc658a commit d5ab6b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ minLength not set, maxLength set
}}{{#minItems}}{{^maxItems}}@Size(min = {{minItems}}) {{/maxItems}}{{/minItems}}{{!
@Size: minItems not set && maxItems set
}}{{^minItems}}{{#maxItems}}@Size(max = {{.}}) {{/maxItems}}{{/minItems}}{{!
@Email: useBeanValidation set && isEmail set
}}{{#useBeanValidation}}{{#isEmail}}@Email{{/isEmail}}{{/useBeanValidation}}{{!
@Email: useBeanValidation set && isEmail && java8 set
}}{{#useBeanValidation}}{{#isEmail}}{{#java8}}@org.hibernate.validator.constraints.Email{{/java8}}{{/isEmail}}{{/useBeanValidation}}{{!
@Email: performBeanValidation set && isEmail && not java8 set
}}{{#performBeanValidation}}{{#isEmail}}{{^java8}}@jakarta.validation.constraints.Email{{/java8}}{{/isEmail}}{{/performBeanValidation}}{{!
check for integer or long / all others=decimal type with @Decimal*
isInteger set
}}{{#isInteger}}{{#minimum}}@Min({{.}}) {{/minimum}}{{#maximum}}@Max({{.}}) {{/maximum}}{{/isInteger}}{{!
Expand Down
6 changes: 6 additions & 0 deletions boat-scaffold/src/test/resources/boat-spring/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ components:
minLength: 7
maxLength: 10
description: "Transaction data string map"
emailAddress:
type: string
description: Sender Email
format: email
maxLength: 250
example: [email protected]
PaymentRequestLine:
required:
- accountId
Expand Down

0 comments on commit d5ab6b5

Please sign in to comment.