forked from loafle/openapi-generator-original
parent
f236b08877
commit
6383872b5f
@ -1,53 +1,4 @@
|
|||||||
{{#required}}
|
{{#required}}
|
||||||
@NotNull
|
@NotNull
|
||||||
{{/required}}
|
{{/required}}
|
||||||
{{#pattern}}
|
{{>beanValidationCore}}
|
||||||
@Pattern(regexp="{{pattern}}")
|
|
||||||
{{/pattern}}
|
|
||||||
{{#minLength}}
|
|
||||||
{{#maxLength}}
|
|
||||||
@Size(min={{minLength}},max={{maxLength}})
|
|
||||||
{{/maxLength}}
|
|
||||||
{{/minLength}}
|
|
||||||
{{#minLength}}
|
|
||||||
{{^maxLength}}
|
|
||||||
@Size(min={{minLength}})
|
|
||||||
{{/maxLength}}
|
|
||||||
{{/minLength}}
|
|
||||||
{{^minLength}}
|
|
||||||
{{#maxLength}}
|
|
||||||
@Size(max={{maxLength}})
|
|
||||||
{{/maxLength}}
|
|
||||||
{{/minLength}}
|
|
||||||
{{#minItems}}
|
|
||||||
{{#maxItems}}
|
|
||||||
@Size(min={{minItems}},max={{maxItems}})
|
|
||||||
{{/maxItems}}
|
|
||||||
{{/minItems}}
|
|
||||||
{{#minItems}}
|
|
||||||
{{^maxItems}}
|
|
||||||
@Size(min={{minItems}})
|
|
||||||
{{/maxItems}}
|
|
||||||
{{/minItems}}
|
|
||||||
{{^minItems}}
|
|
||||||
{{#maxItems}}
|
|
||||||
@Size(max={{maxItems}})
|
|
||||||
{{/maxItems}}
|
|
||||||
{{/minItems}}
|
|
||||||
{{! check for integer / number=decimal type}}
|
|
||||||
{{#isInteger}}
|
|
||||||
{{#minimum}}
|
|
||||||
@Min({{minimum}})
|
|
||||||
{{/minimum}}
|
|
||||||
{{#maximum}}
|
|
||||||
@Max({{maximum}})
|
|
||||||
{{/maximum}}
|
|
||||||
{{/isInteger}}
|
|
||||||
{{^isInteger}}
|
|
||||||
{{#minimum}}
|
|
||||||
@DecimalMin("{{minimum}}")
|
|
||||||
{{/minimum}}
|
|
||||||
{{#maximum}}
|
|
||||||
@DecimalMax("{{maximum}}")
|
|
||||||
{{/maximum}}
|
|
||||||
{{/isInteger}}
|
|
@ -0,0 +1,20 @@
|
|||||||
|
{{#pattern}} @Pattern(regexp="{{pattern}}"){{/pattern}}{{!
|
||||||
|
minLength && maxLength set
|
||||||
|
}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{!
|
||||||
|
minLength set, maxLength not
|
||||||
|
}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{!
|
||||||
|
minLength not set, maxLength set
|
||||||
|
}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{!
|
||||||
|
@Size: minItems && maxItems set
|
||||||
|
}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{!
|
||||||
|
@Size: minItems set, maxItems not
|
||||||
|
}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{!
|
||||||
|
@Size: minItems not set && maxItems set
|
||||||
|
}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{!
|
||||||
|
check for integer or long / all others=decimal type with @Decimal*
|
||||||
|
isInteger set
|
||||||
|
}}{{#isInteger}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isInteger}}{{!
|
||||||
|
isLong set
|
||||||
|
}}{{#isLong}}{{#minimum}} @Min({{minimum}}){{/minimum}}{{#maximum}} @Max({{maximum}}){{/maximum}}{{/isLong}}{{!
|
||||||
|
Not Integer, not Long => we have a decimal value!
|
||||||
|
}}{{^isInteger}}{{^isLong}}{{#minimum}} @DecimalMin("{{minimum}}"){{/minimum}}{{#maximum}} @DecimalMax("{{maximum}}"){{/maximum}}{{/isLong}}{{/isInteger}}
|
@ -1 +1 @@
|
|||||||
{{#required}} @NotNull{{/required}}{{#pattern}} @Pattern(regexp="{{pattern}}"){{/pattern}}{{#minLength}}{{#maxLength}} @Size(min={{minLength}},max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minLength}}{{^maxLength}} @Size(min={{minLength}}){{/maxLength}}{{/minLength}}{{^minLength}}{{#maxLength}} @Size(max={{maxLength}}){{/maxLength}}{{/minLength}}{{#minItems}}{{#maxItems}} @Size(min={{minItems}},max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minItems}}{{^maxItems}} @Size(min={{minItems}}){{/maxItems}}{{/minItems}}{{^minItems}}{{#maxItems}} @Size(max={{maxItems}}){{/maxItems}}{{/minItems}}{{#minimum}}/* @Min({{minimum}}) */{{/minimum}}{{#maximum}}/* @Max({{maximum}}) */{{/maximum}}
|
{{#required}} @NotNull{{/required}}{{>beanValidationCore}}
|
@ -8,17 +8,17 @@ git_repo_id=$2
|
|||||||
release_note=$3
|
release_note=$3
|
||||||
|
|
||||||
if [ "$git_user_id" = "" ]; then
|
if [ "$git_user_id" = "" ]; then
|
||||||
git_user_id="GIT_USER_ID"
|
git_user_id=""
|
||||||
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$git_repo_id" = "" ]; then
|
if [ "$git_repo_id" = "" ]; then
|
||||||
git_repo_id="GIT_REPO_ID"
|
git_repo_id=""
|
||||||
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$release_note" = "" ]; then
|
if [ "$release_note" = "" ]; then
|
||||||
release_note="Minor update"
|
release_note=""
|
||||||
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user