Remove bean validation for uuid (#18900)

* Remove bean validation for uuid

* Add maxLenght to test the uuid validation
This commit is contained in:
Dennis Melzer 2024-06-12 05:53:14 +02:00 committed by GitHub
parent 37ea82b2c7
commit 7084e87140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 15 additions and 2 deletions

View File

@ -1,4 +1,4 @@
{{#pattern}}{{^isByteArray}}@Pattern(regexp = "{{{pattern}}}"{{#vendorExtensions.x-pattern-message}}, message="{{vendorExtensions.x-pattern-message}}"{{/vendorExtensions.x-pattern-message}}) {{/isByteArray}}{{/pattern}}{{!
{{^isUuid}}{{#pattern}}{{^isByteArray}}@Pattern(regexp = "{{{pattern}}}"{{#vendorExtensions.x-pattern-message}}, message="{{vendorExtensions.x-pattern-message}}"{{/vendorExtensions.x-pattern-message}}) {{/isByteArray}}{{/pattern}}{{!
minLength && maxLength set
}}{{#minLength}}{{#maxLength}}@Size(min = {{minLength}}, max = {{maxLength}}) {{/maxLength}}{{/minLength}}{{!
minLength set, maxLength not
@ -21,4 +21,4 @@ isInteger set
isLong set
}}{{#isLong}}{{#minimum}}@Min({{.}}L) {{/minimum}}{{#maximum}}@Max({{.}}L) {{/maximum}}{{/isLong}}{{!
Not Integer, not Long => we have a decimal value!
}}{{^isInteger}}{{^isLong}}{{#minimum}}@DecimalMin({{#exclusiveMinimum}}value = {{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}}, inclusive = false{{/exclusiveMinimum}}) {{/minimum}}{{#maximum}}@DecimalMax({{#exclusiveMaximum}}value = {{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}}, inclusive = false{{/exclusiveMaximum}}) {{/maximum}}{{/isLong}}{{/isInteger}}
}}{{^isInteger}}{{^isLong}}{{#minimum}}@DecimalMin({{#exclusiveMinimum}}value = {{/exclusiveMinimum}}"{{minimum}}"{{#exclusiveMinimum}}, inclusive = false{{/exclusiveMinimum}}) {{/minimum}}{{#maximum}}@DecimalMax({{#exclusiveMaximum}}value = {{/exclusiveMaximum}}"{{maximum}}"{{#exclusiveMaximum}}, inclusive = false{{/exclusiveMaximum}}) {{/maximum}}{{/isLong}}{{/isInteger}}{{/isUuid}}

View File

@ -1454,6 +1454,7 @@ components:
uuid:
type: string
format: uuid
maxLength: 36
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
password:
type: string

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password

View File

@ -1609,6 +1609,7 @@ components:
uuid:
example: 72f98069-206d-4f12-9f12-3d1e525a8e84
format: uuid
maxLength: 36
type: string
password:
format: password