Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,53 +1,4 @@
{{#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}}
{{! 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}}
{{>beanValidationCore}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{! PathParam is always required, no @NotNull necessary }}{{#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}}
{{! PathParam is always required, no @NotNull necessary }}{{>beanValidationCore}}
Original file line number Diff line number Diff line change
@@ -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}}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public Response testClientModel(Client body) {
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid username supplied", response = void.class),
@ApiResponse(code = 404, message = "User not found", response = void.class) })
public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "double") Double _double,@FormParam(value = "pattern_without_delimiter") String patternWithoutDelimiter,@FormParam(value = "byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") javax.xml.datatype.XMLGregorianCalendar dateTime,@FormParam(value = "password") String password,@FormParam(value = "callback") String paramCallback) {
public Response testEndpointParameters(@FormParam(value = "number") BigDecimal number,@FormParam(value = "_double") Double _double,@FormParam(value = "patternWithoutDelimiter") String patternWithoutDelimiter,@FormParam(value = "_byte") byte[] _byte,@FormParam(value = "integer") Integer integer,@FormParam(value = "int32") Integer int32,@FormParam(value = "int64") Long int64,@FormParam(value = "_float") Float _float,@FormParam(value = "string") String string,@FormParam(value = "binary") byte[] binary,@FormParam(value = "date") LocalDate date,@FormParam(value = "dateTime") javax.xml.datatype.XMLGregorianCalendar dateTime,@FormParam(value = "password") String password,@FormParam(value = "paramCallback") String paramCallback) {
return Response.ok().entity("magic!").build();
}

Expand All @@ -54,7 +54,7 @@ public Response testEndpointParameters(@FormParam(value = "number") BigDecimal
@ApiResponses(value = {
@ApiResponse(code = 400, message = "Invalid request", response = void.class),
@ApiResponse(code = 404, message = "Not found", response = void.class) })
public Response testEnumParameters(@FormParam(value = "enum_form_string_array") List<String> enumFormStringArray,@FormParam(value = "enum_form_string") String enumFormString,@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enum_query_double") Double enumQueryDouble) {
public Response testEnumParameters(@FormParam(value = "enumFormStringArray") List<String> enumFormStringArray,@FormParam(value = "enumFormString") String enumFormString,@HeaderParam("enum_header_string_array") List<String> enumHeaderStringArray,@HeaderParam("enum_header_string") String enumHeaderString,@QueryParam("enum_query_string_array") List<String> enumQueryStringArray,@QueryParam("enum_query_string") String enumQueryString,@QueryParam("enum_query_integer") Integer enumQueryInteger,@FormParam(value = "enumQueryDouble") Double enumQueryDouble) {
return Response.ok().entity("magic!").build();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void setMapOfMapProperty(Map<String, Map<String, String>> mapOfMapPropert


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -81,7 +81,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void setColor(String color) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -81,7 +81,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class AnimalFarm extends ArrayList<Animal> {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -44,7 +44,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void setArrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -62,7 +62,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public void setArrayNumber(List<BigDecimal> arrayNumber) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -62,7 +62,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setArrayArrayOfModel(List<List<ReadOnlyFirst>> arrayArrayOfModel) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -100,7 +100,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void setATTNAME(String ATT_NAME) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -155,7 +155,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void setDeclawed(Boolean declawed) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -60,7 +60,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void setName(String name) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -78,7 +78,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void setPropertyClass(String propertyClass) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -63,7 +63,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void setClient(String client) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -59,7 +59,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public void setBreed(String breed) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -60,7 +60,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void setArrayEnum(List<ArrayEnumEnum> arrayEnum) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -142,7 +142,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public void setOuterEnum(OuterEnum outerEnum) {


@Override
public boolean equals(java.lang.Object o) {
public boolean equals(Object o) {
if (this == o) {
return true;
}
Expand Down Expand Up @@ -210,7 +210,7 @@ public String toString() {
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
Expand Down
Loading