forked from loafle/openapi-generator-original
include {min|max}Items validation in rust-server models (#17201)
This commit is contained in:
@@ -296,6 +296,19 @@ pub struct {{{classname}}} {
|
||||
range(min = {{minimum}}),
|
||||
{{/maximum}}
|
||||
{{/minimum}}
|
||||
{{#maxItems}}
|
||||
{{#minItems}}
|
||||
length(min = {{minItems}}, max = {{maxLength}}),
|
||||
{{/minItems}}
|
||||
{{^minItems}}
|
||||
length(max = {{maxItems}}),
|
||||
{{/minItems}}
|
||||
{{/maxItems}}
|
||||
{{^maxItems}}
|
||||
{{#minItems}}
|
||||
length(min = {{minItems}}),
|
||||
{{/minItems}}
|
||||
{{/maxItems}}
|
||||
)]
|
||||
{{/hasValidation}}
|
||||
{{#required}}
|
||||
|
||||
Reference in New Issue
Block a user