[Play Framework] Update the bean validation to use version 2.0. (#8354)

* Update the bean validation to use version 2.0. For a reason I don't know, it was not working anymore with version 1.

* better format

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Jean-François Côté 2021-01-22 21:58:36 -05:00 committed by GitHub
parent 96da7aaf9d
commit 030b75b012
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
117 changed files with 849 additions and 448 deletions

View File

@ -10,6 +10,6 @@ scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
{{/useSwaggerUI}} {{/useSwaggerUI}}
{{#useBeanValidation}} {{#useBeanValidation}}
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
{{/useBeanValidation}} {{/useBeanValidation}}
libraryDependencies += guice libraryDependencies += guice

View File

@ -26,9 +26,15 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
@SerializedName("{{baseName}}") @SerializedName("{{baseName}}")
{{/gson}} {{/gson}}
{{#isContainer}} {{#isContainer}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}}; private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
{{/isContainer}} {{/isContainer}}
{{^isContainer}} {{^isContainer}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}}; private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}} {{/isContainer}}
@ -81,7 +87,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{#vendorExtensions.x-extra-annotation}} {{#vendorExtensions.x-extra-annotation}}
{{{vendorExtensions.x-extra-annotation}}} {{{vendorExtensions.x-extra-annotation}}}
{{/vendorExtensions.x-extra-annotation}} {{/vendorExtensions.x-extra-annotation}}
{{#useBeanValidation}}{{>beanValidation}}{{/useBeanValidation}} public {{{datatypeWithEnum}}} {{getter}}() { public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}}; return {{name}};
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesAnyType extends HashMap<String, Object> { public class AdditionalPropertiesAnyType extends HashMap<String, Object> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesAnyType name(String name) { public AdditionalPropertiesAnyType name(String name) {

View File

@ -15,6 +15,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesArray extends HashMap<String, List> { public class AdditionalPropertiesArray extends HashMap<String, List> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesArray name(String name) { public AdditionalPropertiesArray name(String name) {

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> { public class AdditionalPropertiesBoolean extends HashMap<String, Boolean> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesBoolean name(String name) { public AdditionalPropertiesBoolean name(String name) {

View File

@ -16,36 +16,52 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesClass { public class AdditionalPropertiesClass {
@JsonProperty("map_string") @JsonProperty("map_string")
private Map<String, String> mapString = null; private Map<String, String> mapString = null;
@JsonProperty("map_number") @JsonProperty("map_number")
@Valid
private Map<String, BigDecimal> mapNumber = null; private Map<String, BigDecimal> mapNumber = null;
@JsonProperty("map_integer") @JsonProperty("map_integer")
private Map<String, Integer> mapInteger = null; private Map<String, Integer> mapInteger = null;
@JsonProperty("map_boolean") @JsonProperty("map_boolean")
private Map<String, Boolean> mapBoolean = null; private Map<String, Boolean> mapBoolean = null;
@JsonProperty("map_array_integer") @JsonProperty("map_array_integer")
@Valid
private Map<String, List<Integer>> mapArrayInteger = null; private Map<String, List<Integer>> mapArrayInteger = null;
@JsonProperty("map_array_anytype") @JsonProperty("map_array_anytype")
@Valid
private Map<String, List<Object>> mapArrayAnytype = null; private Map<String, List<Object>> mapArrayAnytype = null;
@JsonProperty("map_map_string") @JsonProperty("map_map_string")
@Valid
private Map<String, Map<String, String>> mapMapString = null; private Map<String, Map<String, String>> mapMapString = null;
@JsonProperty("map_map_anytype") @JsonProperty("map_map_anytype")
@Valid
private Map<String, Map<String, Object>> mapMapAnytype = null; private Map<String, Map<String, Object>> mapMapAnytype = null;
@JsonProperty("anytype_1") @JsonProperty("anytype_1")
private Object anytype1; private Object anytype1;
@JsonProperty("anytype_2") @JsonProperty("anytype_2")
private Object anytype2; private Object anytype2;
@JsonProperty("anytype_3") @JsonProperty("anytype_3")
private Object anytype3; private Object anytype3;
public AdditionalPropertiesClass mapString(Map<String, String> mapString) { public AdditionalPropertiesClass mapString(Map<String, String> mapString) {
@ -90,7 +106,6 @@ public class AdditionalPropertiesClass {
* Get mapNumber * Get mapNumber
* @return mapNumber * @return mapNumber
**/ **/
@Valid
public Map<String, BigDecimal> getMapNumber() { public Map<String, BigDecimal> getMapNumber() {
return mapNumber; return mapNumber;
} }
@ -166,7 +181,6 @@ public class AdditionalPropertiesClass {
* Get mapArrayInteger * Get mapArrayInteger
* @return mapArrayInteger * @return mapArrayInteger
**/ **/
@Valid
public Map<String, List<Integer>> getMapArrayInteger() { public Map<String, List<Integer>> getMapArrayInteger() {
return mapArrayInteger; return mapArrayInteger;
} }
@ -192,7 +206,6 @@ public class AdditionalPropertiesClass {
* Get mapArrayAnytype * Get mapArrayAnytype
* @return mapArrayAnytype * @return mapArrayAnytype
**/ **/
@Valid
public Map<String, List<Object>> getMapArrayAnytype() { public Map<String, List<Object>> getMapArrayAnytype() {
return mapArrayAnytype; return mapArrayAnytype;
} }
@ -218,7 +231,6 @@ public class AdditionalPropertiesClass {
* Get mapMapString * Get mapMapString
* @return mapMapString * @return mapMapString
**/ **/
@Valid
public Map<String, Map<String, String>> getMapMapString() { public Map<String, Map<String, String>> getMapMapString() {
return mapMapString; return mapMapString;
} }
@ -244,7 +256,6 @@ public class AdditionalPropertiesClass {
* Get mapMapAnytype * Get mapMapAnytype
* @return mapMapAnytype * @return mapMapAnytype
**/ **/
@Valid
public Map<String, Map<String, Object>> getMapMapAnytype() { public Map<String, Map<String, Object>> getMapMapAnytype() {
return mapMapAnytype; return mapMapAnytype;
} }

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesInteger extends HashMap<String, Integer> { public class AdditionalPropertiesInteger extends HashMap<String, Integer> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesInteger name(String name) { public AdditionalPropertiesInteger name(String name) {

View File

@ -15,6 +15,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> { public class AdditionalPropertiesNumber extends HashMap<String, BigDecimal> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesNumber name(String name) { public AdditionalPropertiesNumber name(String name) {

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesObject extends HashMap<String, Map> { public class AdditionalPropertiesObject extends HashMap<String, Map> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesObject name(String name) { public AdditionalPropertiesObject name(String name) {

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class AdditionalPropertiesString extends HashMap<String, String> { public class AdditionalPropertiesString extends HashMap<String, String> {
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public AdditionalPropertiesString name(String name) { public AdditionalPropertiesString name(String name) {

View File

@ -14,9 +14,12 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Animal { public class Animal {
@JsonProperty("className") @JsonProperty("className")
@NotNull
private String className; private String className;
@JsonProperty("color") @JsonProperty("color")
private String color = "red"; private String color = "red";
public Animal className(String className) { public Animal className(String className) {
@ -28,7 +31,6 @@ public class Animal {
* Get className * Get className
* @return className * @return className
**/ **/
@NotNull
public String getClassName() { public String getClassName() {
return className; return className;
} }

View File

@ -15,6 +15,8 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ArrayOfArrayOfNumberOnly { public class ArrayOfArrayOfNumberOnly {
@JsonProperty("ArrayArrayNumber") @JsonProperty("ArrayArrayNumber")
@Valid
private List<List<BigDecimal>> arrayArrayNumber = null; private List<List<BigDecimal>> arrayArrayNumber = null;
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) { public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
@ -34,7 +36,6 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber * Get arrayArrayNumber
* @return arrayArrayNumber * @return arrayArrayNumber
**/ **/
@Valid
public List<List<BigDecimal>> getArrayArrayNumber() { public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber; return arrayArrayNumber;
} }

View File

@ -15,6 +15,8 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ArrayOfNumberOnly { public class ArrayOfNumberOnly {
@JsonProperty("ArrayNumber") @JsonProperty("ArrayNumber")
@Valid
private List<BigDecimal> arrayNumber = null; private List<BigDecimal> arrayNumber = null;
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) { public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
@ -34,7 +36,6 @@ public class ArrayOfNumberOnly {
* Get arrayNumber * Get arrayNumber
* @return arrayNumber * @return arrayNumber
**/ **/
@Valid
public List<BigDecimal> getArrayNumber() { public List<BigDecimal> getArrayNumber() {
return arrayNumber; return arrayNumber;
} }

View File

@ -15,12 +15,17 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ArrayTest { public class ArrayTest {
@JsonProperty("array_of_string") @JsonProperty("array_of_string")
private List<String> arrayOfString = null; private List<String> arrayOfString = null;
@JsonProperty("array_array_of_integer") @JsonProperty("array_array_of_integer")
@Valid
private List<List<Long>> arrayArrayOfInteger = null; private List<List<Long>> arrayArrayOfInteger = null;
@JsonProperty("array_array_of_model") @JsonProperty("array_array_of_model")
@Valid
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null; private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
public ArrayTest arrayOfString(List<String> arrayOfString) { public ArrayTest arrayOfString(List<String> arrayOfString) {
@ -65,7 +70,6 @@ public class ArrayTest {
* Get arrayArrayOfInteger * Get arrayArrayOfInteger
* @return arrayArrayOfInteger * @return arrayArrayOfInteger
**/ **/
@Valid
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger; return arrayArrayOfInteger;
} }
@ -91,7 +95,6 @@ public class ArrayTest {
* Get arrayArrayOfModel * Get arrayArrayOfModel
* @return arrayArrayOfModel * @return arrayArrayOfModel
**/ **/
@Valid
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel; return arrayArrayOfModel;
} }

View File

@ -49,6 +49,7 @@ public class BigCat extends Cat {
} }
@JsonProperty("kind") @JsonProperty("kind")
private KindEnum kind; private KindEnum kind;
public BigCat kind(KindEnum kind) { public BigCat kind(KindEnum kind) {

View File

@ -47,6 +47,7 @@ public class BigCatAllOf {
} }
@JsonProperty("kind") @JsonProperty("kind")
private KindEnum kind; private KindEnum kind;
public BigCatAllOf kind(KindEnum kind) { public BigCatAllOf kind(KindEnum kind) {

View File

@ -12,21 +12,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Capitalization { public class Capitalization {
@JsonProperty("smallCamel") @JsonProperty("smallCamel")
private String smallCamel; private String smallCamel;
@JsonProperty("CapitalCamel") @JsonProperty("CapitalCamel")
private String capitalCamel; private String capitalCamel;
@JsonProperty("small_Snake") @JsonProperty("small_Snake")
private String smallSnake; private String smallSnake;
@JsonProperty("Capital_Snake") @JsonProperty("Capital_Snake")
private String capitalSnake; private String capitalSnake;
@JsonProperty("SCA_ETH_Flow_Points") @JsonProperty("SCA_ETH_Flow_Points")
private String scAETHFlowPoints; private String scAETHFlowPoints;
@JsonProperty("ATT_NAME") @JsonProperty("ATT_NAME")
private String ATT_NAME; private String ATT_NAME;
public Capitalization smallCamel(String smallCamel) { public Capitalization smallCamel(String smallCamel) {

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Cat extends Animal { public class Cat extends Animal {
@JsonProperty("declawed") @JsonProperty("declawed")
private Boolean declawed; private Boolean declawed;
public Cat declawed(Boolean declawed) { public Cat declawed(Boolean declawed) {

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class CatAllOf { public class CatAllOf {
@JsonProperty("declawed") @JsonProperty("declawed")
private Boolean declawed; private Boolean declawed;
public CatAllOf declawed(Boolean declawed) { public CatAllOf declawed(Boolean declawed) {

View File

@ -12,9 +12,12 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name = "default-name"; private String name = "default-name";
public Category id(Long id) { public Category id(Long id) {
@ -43,7 +46,6 @@ public class Category {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ClassModel { public class ClassModel {
@JsonProperty("_class") @JsonProperty("_class")
private String propertyClass; private String propertyClass;
public ClassModel propertyClass(String propertyClass) { public ClassModel propertyClass(String propertyClass) {

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Client { public class Client {
@JsonProperty("client") @JsonProperty("client")
private String client; private String client;
public Client client(String client) { public Client client(String client) {

View File

@ -14,6 +14,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Dog extends Animal { public class Dog extends Animal {
@JsonProperty("breed") @JsonProperty("breed")
private String breed; private String breed;
public Dog breed(String breed) { public Dog breed(String breed) {

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class DogAllOf { public class DogAllOf {
@JsonProperty("breed") @JsonProperty("breed")
private String breed; private String breed;
public DogAllOf breed(String breed) { public DogAllOf breed(String breed) {

View File

@ -45,6 +45,7 @@ public class EnumArrays {
} }
@JsonProperty("just_symbol") @JsonProperty("just_symbol")
private JustSymbolEnum justSymbol; private JustSymbolEnum justSymbol;
/** /**
@ -79,6 +80,7 @@ public class EnumArrays {
} }
@JsonProperty("array_enum") @JsonProperty("array_enum")
private List<ArrayEnumEnum> arrayEnum = null; private List<ArrayEnumEnum> arrayEnum = null;
public EnumArrays justSymbol(JustSymbolEnum justSymbol) { public EnumArrays justSymbol(JustSymbolEnum justSymbol) {

View File

@ -46,6 +46,7 @@ public class EnumTest {
} }
@JsonProperty("enum_string") @JsonProperty("enum_string")
private EnumStringEnum enumString; private EnumStringEnum enumString;
/** /**
@ -82,6 +83,8 @@ public class EnumTest {
} }
@JsonProperty("enum_string_required") @JsonProperty("enum_string_required")
@NotNull
private EnumStringRequiredEnum enumStringRequired; private EnumStringRequiredEnum enumStringRequired;
/** /**
@ -116,6 +119,7 @@ public class EnumTest {
} }
@JsonProperty("enum_integer") @JsonProperty("enum_integer")
private EnumIntegerEnum enumInteger; private EnumIntegerEnum enumInteger;
/** /**
@ -150,9 +154,12 @@ public class EnumTest {
} }
@JsonProperty("enum_number") @JsonProperty("enum_number")
private EnumNumberEnum enumNumber; private EnumNumberEnum enumNumber;
@JsonProperty("outerEnum") @JsonProperty("outerEnum")
@Valid
private OuterEnum outerEnum; private OuterEnum outerEnum;
public EnumTest enumString(EnumStringEnum enumString) { public EnumTest enumString(EnumStringEnum enumString) {
@ -181,7 +188,6 @@ public class EnumTest {
* Get enumStringRequired * Get enumStringRequired
* @return enumStringRequired * @return enumStringRequired
**/ **/
@NotNull
public EnumStringRequiredEnum getEnumStringRequired() { public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired; return enumStringRequired;
} }
@ -233,7 +239,6 @@ public class EnumTest {
* Get outerEnum * Get outerEnum
* @return outerEnum * @return outerEnum
**/ **/
@Valid
public OuterEnum getOuterEnum() { public OuterEnum getOuterEnum() {
return outerEnum; return outerEnum;
} }

View File

@ -14,9 +14,13 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class FileSchemaTestClass { public class FileSchemaTestClass {
@JsonProperty("file") @JsonProperty("file")
@Valid
private java.io.File file; private java.io.File file;
@JsonProperty("files") @JsonProperty("files")
@Valid
private List<java.io.File> files = null; private List<java.io.File> files = null;
public FileSchemaTestClass file(java.io.File file) { public FileSchemaTestClass file(java.io.File file) {
@ -28,7 +32,6 @@ public class FileSchemaTestClass {
* Get file * Get file
* @return file * @return file
**/ **/
@Valid
public java.io.File getFile() { public java.io.File getFile() {
return file; return file;
} }
@ -54,7 +57,6 @@ public class FileSchemaTestClass {
* Get files * Get files
* @return files * @return files
**/ **/
@Valid
public List<java.io.File> getFiles() { public List<java.io.File> getFiles() {
return files; return files;
} }

View File

@ -17,45 +17,82 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class FormatTest { public class FormatTest {
@JsonProperty("integer") @JsonProperty("integer")
@Min(10)
@Max(100)
private Integer integer; private Integer integer;
@JsonProperty("int32") @JsonProperty("int32")
@Min(20)
@Max(200)
private Integer int32; private Integer int32;
@JsonProperty("int64") @JsonProperty("int64")
private Long int64; private Long int64;
@JsonProperty("number") @JsonProperty("number")
@NotNull
@DecimalMin("32.1")
@DecimalMax("543.2")
@Valid
private BigDecimal number; private BigDecimal number;
@JsonProperty("float") @JsonProperty("float")
@DecimalMin("54.3")
@DecimalMax("987.6")
private Float _float; private Float _float;
@JsonProperty("double") @JsonProperty("double")
@DecimalMin("67.8")
@DecimalMax("123.4")
private Double _double; private Double _double;
@JsonProperty("string") @JsonProperty("string")
@Pattern(regexp="/[a-z]/i")
private String string; private String string;
@JsonProperty("byte") @JsonProperty("byte")
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
private byte[] _byte; private byte[] _byte;
@JsonProperty("binary") @JsonProperty("binary")
@Valid
private InputStream binary; private InputStream binary;
@JsonProperty("date") @JsonProperty("date")
@NotNull
@Valid
private LocalDate date; private LocalDate date;
@JsonProperty("dateTime") @JsonProperty("dateTime")
@Valid
private OffsetDateTime dateTime; private OffsetDateTime dateTime;
@JsonProperty("uuid") @JsonProperty("uuid")
@Valid
private UUID uuid; private UUID uuid;
@JsonProperty("password") @JsonProperty("password")
@NotNull
@Size(min=10,max=64)
private String password; private String password;
@JsonProperty("BigDecimal") @JsonProperty("BigDecimal")
@Valid
private BigDecimal bigDecimal; private BigDecimal bigDecimal;
public FormatTest integer(Integer integer) { public FormatTest integer(Integer integer) {
@ -69,8 +106,6 @@ public class FormatTest {
* maximum: 100 * maximum: 100
* @return integer * @return integer
**/ **/
@Min(10)
@Max(100)
public Integer getInteger() { public Integer getInteger() {
return integer; return integer;
} }
@ -90,8 +125,6 @@ public class FormatTest {
* maximum: 200 * maximum: 200
* @return int32 * @return int32
**/ **/
@Min(20)
@Max(200)
public Integer getInt32() { public Integer getInt32() {
return int32; return int32;
} }
@ -128,10 +161,6 @@ public class FormatTest {
* maximum: 543.2 * maximum: 543.2
* @return number * @return number
**/ **/
@NotNull
@DecimalMin("32.1")
@DecimalMax("543.2")
@Valid
public BigDecimal getNumber() { public BigDecimal getNumber() {
return number; return number;
} }
@ -151,8 +180,6 @@ public class FormatTest {
* maximum: 987.6 * maximum: 987.6
* @return _float * @return _float
**/ **/
@DecimalMin("54.3")
@DecimalMax("987.6")
public Float getFloat() { public Float getFloat() {
return _float; return _float;
} }
@ -172,8 +199,6 @@ public class FormatTest {
* maximum: 123.4 * maximum: 123.4
* @return _double * @return _double
**/ **/
@DecimalMin("67.8")
@DecimalMax("123.4")
public Double getDouble() { public Double getDouble() {
return _double; return _double;
} }
@ -191,7 +216,6 @@ public class FormatTest {
* Get string * Get string
* @return string * @return string
**/ **/
@Pattern(regexp="/[a-z]/i")
public String getString() { public String getString() {
return string; return string;
} }
@ -209,8 +233,6 @@ public class FormatTest {
* Get _byte * Get _byte
* @return _byte * @return _byte
**/ **/
@NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$")
public byte[] getByte() { public byte[] getByte() {
return _byte; return _byte;
} }
@ -228,7 +250,6 @@ public class FormatTest {
* Get binary * Get binary
* @return binary * @return binary
**/ **/
@Valid
public InputStream getBinary() { public InputStream getBinary() {
return binary; return binary;
} }
@ -246,8 +267,6 @@ public class FormatTest {
* Get date * Get date
* @return date * @return date
**/ **/
@NotNull
@Valid
public LocalDate getDate() { public LocalDate getDate() {
return date; return date;
} }
@ -265,7 +284,6 @@ public class FormatTest {
* Get dateTime * Get dateTime
* @return dateTime * @return dateTime
**/ **/
@Valid
public OffsetDateTime getDateTime() { public OffsetDateTime getDateTime() {
return dateTime; return dateTime;
} }
@ -283,7 +301,6 @@ public class FormatTest {
* Get uuid * Get uuid
* @return uuid * @return uuid
**/ **/
@Valid
public UUID getUuid() { public UUID getUuid() {
return uuid; return uuid;
} }
@ -301,8 +318,6 @@ public class FormatTest {
* Get password * Get password
* @return password * @return password
**/ **/
@NotNull
@Size(min=10,max=64)
public String getPassword() { public String getPassword() {
return password; return password;
} }
@ -320,7 +335,6 @@ public class FormatTest {
* Get bigDecimal * Get bigDecimal
* @return bigDecimal * @return bigDecimal
**/ **/
@Valid
public BigDecimal getBigDecimal() { public BigDecimal getBigDecimal() {
return bigDecimal; return bigDecimal;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class HasOnlyReadOnly { public class HasOnlyReadOnly {
@JsonProperty("bar") @JsonProperty("bar")
private String bar; private String bar;
@JsonProperty("foo") @JsonProperty("foo")
private String foo; private String foo;
public HasOnlyReadOnly bar(String bar) { public HasOnlyReadOnly bar(String bar) {

View File

@ -15,6 +15,8 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class MapTest { public class MapTest {
@JsonProperty("map_map_of_string") @JsonProperty("map_map_of_string")
@Valid
private Map<String, Map<String, String>> mapMapOfString = null; private Map<String, Map<String, String>> mapMapOfString = null;
/** /**
@ -49,12 +51,15 @@ public class MapTest {
} }
@JsonProperty("map_of_enum_string") @JsonProperty("map_of_enum_string")
private Map<String, InnerEnum> mapOfEnumString = null; private Map<String, InnerEnum> mapOfEnumString = null;
@JsonProperty("direct_map") @JsonProperty("direct_map")
private Map<String, Boolean> directMap = null; private Map<String, Boolean> directMap = null;
@JsonProperty("indirect_map") @JsonProperty("indirect_map")
private Map<String, Boolean> indirectMap = null; private Map<String, Boolean> indirectMap = null;
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) { public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
@ -74,7 +79,6 @@ public class MapTest {
* Get mapMapOfString * Get mapMapOfString
* @return mapMapOfString * @return mapMapOfString
**/ **/
@Valid
public Map<String, Map<String, String>> getMapMapOfString() { public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString; return mapMapOfString;
} }

View File

@ -18,12 +18,18 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class MixedPropertiesAndAdditionalPropertiesClass { public class MixedPropertiesAndAdditionalPropertiesClass {
@JsonProperty("uuid") @JsonProperty("uuid")
@Valid
private UUID uuid; private UUID uuid;
@JsonProperty("dateTime") @JsonProperty("dateTime")
@Valid
private OffsetDateTime dateTime; private OffsetDateTime dateTime;
@JsonProperty("map") @JsonProperty("map")
@Valid
private Map<String, Animal> map = null; private Map<String, Animal> map = null;
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) { public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
@ -35,7 +41,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid * Get uuid
* @return uuid * @return uuid
**/ **/
@Valid
public UUID getUuid() { public UUID getUuid() {
return uuid; return uuid;
} }
@ -53,7 +58,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime * Get dateTime
* @return dateTime * @return dateTime
**/ **/
@Valid
public OffsetDateTime getDateTime() { public OffsetDateTime getDateTime() {
return dateTime; return dateTime;
} }
@ -79,7 +83,6 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map * Get map
* @return map * @return map
**/ **/
@Valid
public Map<String, Animal> getMap() { public Map<String, Animal> getMap() {
return map; return map;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Model200Response { public class Model200Response {
@JsonProperty("name") @JsonProperty("name")
private Integer name; private Integer name;
@JsonProperty("class") @JsonProperty("class")
private String propertyClass; private String propertyClass;
public Model200Response name(Integer name) { public Model200Response name(Integer name) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelReturn { public class ModelReturn {
@JsonProperty("return") @JsonProperty("return")
private Integer _return; private Integer _return;
public ModelReturn _return(Integer _return) { public ModelReturn _return(Integer _return) {

View File

@ -12,15 +12,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Name { public class Name {
@JsonProperty("name") @JsonProperty("name")
@NotNull
private Integer name; private Integer name;
@JsonProperty("snake_case") @JsonProperty("snake_case")
private Integer snakeCase; private Integer snakeCase;
@JsonProperty("property") @JsonProperty("property")
private String property; private String property;
@JsonProperty("123Number") @JsonProperty("123Number")
private Integer _123number; private Integer _123number;
public Name name(Integer name) { public Name name(Integer name) {
@ -32,7 +37,6 @@ public class Name {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public Integer getName() { public Integer getName() {
return name; return name;
} }

View File

@ -13,6 +13,8 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class NumberOnly { public class NumberOnly {
@JsonProperty("JustNumber") @JsonProperty("JustNumber")
@Valid
private BigDecimal justNumber; private BigDecimal justNumber;
public NumberOnly justNumber(BigDecimal justNumber) { public NumberOnly justNumber(BigDecimal justNumber) {
@ -24,7 +26,6 @@ public class NumberOnly {
* Get justNumber * Get justNumber
* @return justNumber * @return justNumber
**/ **/
@Valid
public BigDecimal getJustNumber() { public BigDecimal getJustNumber() {
return justNumber; return justNumber;
} }

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -13,12 +13,16 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class OuterComposite { public class OuterComposite {
@JsonProperty("my_number") @JsonProperty("my_number")
@Valid
private BigDecimal myNumber; private BigDecimal myNumber;
@JsonProperty("my_string") @JsonProperty("my_string")
private String myString; private String myString;
@JsonProperty("my_boolean") @JsonProperty("my_boolean")
private Boolean myBoolean; private Boolean myBoolean;
public OuterComposite myNumber(BigDecimal myNumber) { public OuterComposite myNumber(BigDecimal myNumber) {
@ -30,7 +34,6 @@ public class OuterComposite {
* Get myNumber * Get myNumber
* @return myNumber * @return myNumber
**/ **/
@Valid
public BigDecimal getMyNumber() { public BigDecimal getMyNumber() {
return myNumber; return myNumber;
} }

View File

@ -18,18 +18,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private Set<String> photoUrls = new LinkedHashSet<>(); private Set<String> photoUrls = new LinkedHashSet<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -66,6 +75,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -94,7 +104,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -112,7 +121,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -135,7 +143,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public Set<String> getPhotoUrls() { public Set<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -161,7 +168,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ReadOnlyFirst { public class ReadOnlyFirst {
@JsonProperty("bar") @JsonProperty("bar")
private String bar; private String bar;
@JsonProperty("baz") @JsonProperty("baz")
private String baz; private String baz;
public ReadOnlyFirst bar(String bar) { public ReadOnlyFirst bar(String bar) {

View File

@ -12,6 +12,7 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class SpecialModelName { public class SpecialModelName {
@JsonProperty("$special[property.name]") @JsonProperty("$special[property.name]")
private Long $specialPropertyName; private Long $specialPropertyName;
public SpecialModelName $specialPropertyName(Long $specialPropertyName) { public SpecialModelName $specialPropertyName(Long $specialPropertyName) {

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -15,18 +15,29 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class TypeHolderDefault { public class TypeHolderDefault {
@JsonProperty("string_item") @JsonProperty("string_item")
@NotNull
private String stringItem = "what"; private String stringItem = "what";
@JsonProperty("number_item") @JsonProperty("number_item")
@NotNull
@Valid
private BigDecimal numberItem; private BigDecimal numberItem;
@JsonProperty("integer_item") @JsonProperty("integer_item")
@NotNull
private Integer integerItem; private Integer integerItem;
@JsonProperty("bool_item") @JsonProperty("bool_item")
@NotNull
private Boolean boolItem = true; private Boolean boolItem = true;
@JsonProperty("array_item") @JsonProperty("array_item")
@NotNull
private List<Integer> arrayItem = new ArrayList<>(); private List<Integer> arrayItem = new ArrayList<>();
public TypeHolderDefault stringItem(String stringItem) { public TypeHolderDefault stringItem(String stringItem) {
@ -38,7 +49,6 @@ public class TypeHolderDefault {
* Get stringItem * Get stringItem
* @return stringItem * @return stringItem
**/ **/
@NotNull
public String getStringItem() { public String getStringItem() {
return stringItem; return stringItem;
} }
@ -56,8 +66,6 @@ public class TypeHolderDefault {
* Get numberItem * Get numberItem
* @return numberItem * @return numberItem
**/ **/
@NotNull
@Valid
public BigDecimal getNumberItem() { public BigDecimal getNumberItem() {
return numberItem; return numberItem;
} }
@ -75,7 +83,6 @@ public class TypeHolderDefault {
* Get integerItem * Get integerItem
* @return integerItem * @return integerItem
**/ **/
@NotNull
public Integer getIntegerItem() { public Integer getIntegerItem() {
return integerItem; return integerItem;
} }
@ -93,7 +100,6 @@ public class TypeHolderDefault {
* Get boolItem * Get boolItem
* @return boolItem * @return boolItem
**/ **/
@NotNull
public Boolean getBoolItem() { public Boolean getBoolItem() {
return boolItem; return boolItem;
} }
@ -116,7 +122,6 @@ public class TypeHolderDefault {
* Get arrayItem * Get arrayItem
* @return arrayItem * @return arrayItem
**/ **/
@NotNull
public List<Integer> getArrayItem() { public List<Integer> getArrayItem() {
return arrayItem; return arrayItem;
} }

View File

@ -15,21 +15,34 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class TypeHolderExample { public class TypeHolderExample {
@JsonProperty("string_item") @JsonProperty("string_item")
@NotNull
private String stringItem; private String stringItem;
@JsonProperty("number_item") @JsonProperty("number_item")
@NotNull
@Valid
private BigDecimal numberItem; private BigDecimal numberItem;
@JsonProperty("float_item") @JsonProperty("float_item")
@NotNull
private Float floatItem; private Float floatItem;
@JsonProperty("integer_item") @JsonProperty("integer_item")
@NotNull
private Integer integerItem; private Integer integerItem;
@JsonProperty("bool_item") @JsonProperty("bool_item")
@NotNull
private Boolean boolItem; private Boolean boolItem;
@JsonProperty("array_item") @JsonProperty("array_item")
@NotNull
private List<Integer> arrayItem = new ArrayList<>(); private List<Integer> arrayItem = new ArrayList<>();
public TypeHolderExample stringItem(String stringItem) { public TypeHolderExample stringItem(String stringItem) {
@ -41,7 +54,6 @@ public class TypeHolderExample {
* Get stringItem * Get stringItem
* @return stringItem * @return stringItem
**/ **/
@NotNull
public String getStringItem() { public String getStringItem() {
return stringItem; return stringItem;
} }
@ -59,8 +71,6 @@ public class TypeHolderExample {
* Get numberItem * Get numberItem
* @return numberItem * @return numberItem
**/ **/
@NotNull
@Valid
public BigDecimal getNumberItem() { public BigDecimal getNumberItem() {
return numberItem; return numberItem;
} }
@ -78,7 +88,6 @@ public class TypeHolderExample {
* Get floatItem * Get floatItem
* @return floatItem * @return floatItem
**/ **/
@NotNull
public Float getFloatItem() { public Float getFloatItem() {
return floatItem; return floatItem;
} }
@ -96,7 +105,6 @@ public class TypeHolderExample {
* Get integerItem * Get integerItem
* @return integerItem * @return integerItem
**/ **/
@NotNull
public Integer getIntegerItem() { public Integer getIntegerItem() {
return integerItem; return integerItem;
} }
@ -114,7 +122,6 @@ public class TypeHolderExample {
* Get boolItem * Get boolItem
* @return boolItem * @return boolItem
**/ **/
@NotNull
public Boolean getBoolItem() { public Boolean getBoolItem() {
return boolItem; return boolItem;
} }
@ -137,7 +144,6 @@ public class TypeHolderExample {
* Get arrayItem * Get arrayItem
* @return arrayItem * @return arrayItem
**/ **/
@NotNull
public List<Integer> getArrayItem() { public List<Integer> getArrayItem() {
return arrayItem; return arrayItem;
} }

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -15,90 +15,124 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class XmlItem { public class XmlItem {
@JsonProperty("attribute_string") @JsonProperty("attribute_string")
private String attributeString; private String attributeString;
@JsonProperty("attribute_number") @JsonProperty("attribute_number")
@Valid
private BigDecimal attributeNumber; private BigDecimal attributeNumber;
@JsonProperty("attribute_integer") @JsonProperty("attribute_integer")
private Integer attributeInteger; private Integer attributeInteger;
@JsonProperty("attribute_boolean") @JsonProperty("attribute_boolean")
private Boolean attributeBoolean; private Boolean attributeBoolean;
@JsonProperty("wrapped_array") @JsonProperty("wrapped_array")
private List<Integer> wrappedArray = null; private List<Integer> wrappedArray = null;
@JsonProperty("name_string") @JsonProperty("name_string")
private String nameString; private String nameString;
@JsonProperty("name_number") @JsonProperty("name_number")
@Valid
private BigDecimal nameNumber; private BigDecimal nameNumber;
@JsonProperty("name_integer") @JsonProperty("name_integer")
private Integer nameInteger; private Integer nameInteger;
@JsonProperty("name_boolean") @JsonProperty("name_boolean")
private Boolean nameBoolean; private Boolean nameBoolean;
@JsonProperty("name_array") @JsonProperty("name_array")
private List<Integer> nameArray = null; private List<Integer> nameArray = null;
@JsonProperty("name_wrapped_array") @JsonProperty("name_wrapped_array")
private List<Integer> nameWrappedArray = null; private List<Integer> nameWrappedArray = null;
@JsonProperty("prefix_string") @JsonProperty("prefix_string")
private String prefixString; private String prefixString;
@JsonProperty("prefix_number") @JsonProperty("prefix_number")
@Valid
private BigDecimal prefixNumber; private BigDecimal prefixNumber;
@JsonProperty("prefix_integer") @JsonProperty("prefix_integer")
private Integer prefixInteger; private Integer prefixInteger;
@JsonProperty("prefix_boolean") @JsonProperty("prefix_boolean")
private Boolean prefixBoolean; private Boolean prefixBoolean;
@JsonProperty("prefix_array") @JsonProperty("prefix_array")
private List<Integer> prefixArray = null; private List<Integer> prefixArray = null;
@JsonProperty("prefix_wrapped_array") @JsonProperty("prefix_wrapped_array")
private List<Integer> prefixWrappedArray = null; private List<Integer> prefixWrappedArray = null;
@JsonProperty("namespace_string") @JsonProperty("namespace_string")
private String namespaceString; private String namespaceString;
@JsonProperty("namespace_number") @JsonProperty("namespace_number")
@Valid
private BigDecimal namespaceNumber; private BigDecimal namespaceNumber;
@JsonProperty("namespace_integer") @JsonProperty("namespace_integer")
private Integer namespaceInteger; private Integer namespaceInteger;
@JsonProperty("namespace_boolean") @JsonProperty("namespace_boolean")
private Boolean namespaceBoolean; private Boolean namespaceBoolean;
@JsonProperty("namespace_array") @JsonProperty("namespace_array")
private List<Integer> namespaceArray = null; private List<Integer> namespaceArray = null;
@JsonProperty("namespace_wrapped_array") @JsonProperty("namespace_wrapped_array")
private List<Integer> namespaceWrappedArray = null; private List<Integer> namespaceWrappedArray = null;
@JsonProperty("prefix_ns_string") @JsonProperty("prefix_ns_string")
private String prefixNsString; private String prefixNsString;
@JsonProperty("prefix_ns_number") @JsonProperty("prefix_ns_number")
@Valid
private BigDecimal prefixNsNumber; private BigDecimal prefixNsNumber;
@JsonProperty("prefix_ns_integer") @JsonProperty("prefix_ns_integer")
private Integer prefixNsInteger; private Integer prefixNsInteger;
@JsonProperty("prefix_ns_boolean") @JsonProperty("prefix_ns_boolean")
private Boolean prefixNsBoolean; private Boolean prefixNsBoolean;
@JsonProperty("prefix_ns_array") @JsonProperty("prefix_ns_array")
private List<Integer> prefixNsArray = null; private List<Integer> prefixNsArray = null;
@JsonProperty("prefix_ns_wrapped_array") @JsonProperty("prefix_ns_wrapped_array")
private List<Integer> prefixNsWrappedArray = null; private List<Integer> prefixNsWrappedArray = null;
public XmlItem attributeString(String attributeString) { public XmlItem attributeString(String attributeString) {
@ -127,7 +161,6 @@ public class XmlItem {
* Get attributeNumber * Get attributeNumber
* @return attributeNumber * @return attributeNumber
**/ **/
@Valid
public BigDecimal getAttributeNumber() { public BigDecimal getAttributeNumber() {
return attributeNumber; return attributeNumber;
} }
@ -221,7 +254,6 @@ public class XmlItem {
* Get nameNumber * Get nameNumber
* @return nameNumber * @return nameNumber
**/ **/
@Valid
public BigDecimal getNameNumber() { public BigDecimal getNameNumber() {
return nameNumber; return nameNumber;
} }
@ -340,7 +372,6 @@ public class XmlItem {
* Get prefixNumber * Get prefixNumber
* @return prefixNumber * @return prefixNumber
**/ **/
@Valid
public BigDecimal getPrefixNumber() { public BigDecimal getPrefixNumber() {
return prefixNumber; return prefixNumber;
} }
@ -459,7 +490,6 @@ public class XmlItem {
* Get namespaceNumber * Get namespaceNumber
* @return namespaceNumber * @return namespaceNumber
**/ **/
@Valid
public BigDecimal getNamespaceNumber() { public BigDecimal getNamespaceNumber() {
return namespaceNumber; return namespaceNumber;
} }
@ -578,7 +608,6 @@ public class XmlItem {
* Get prefixNsNumber * Get prefixNsNumber
* @return prefixNsNumber * @return prefixNsNumber
**/ **/
@Valid
public BigDecimal getPrefixNsNumber() { public BigDecimal getPrefixNsNumber() {
return prefixNsNumber; return prefixNsNumber;
} }

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5" libraryDependencies += "org.webjars" % "swagger-ui" % "3.32.5"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag { public class Tag {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Tag id(Long id) { public Tag id(Long id) {

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User { public class User {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("username") @JsonProperty("username")
private String username; private String username;
@JsonProperty("firstName") @JsonProperty("firstName")
private String firstName; private String firstName;
@JsonProperty("lastName") @JsonProperty("lastName")
private String lastName; private String lastName;
@JsonProperty("email") @JsonProperty("email")
private String email; private String email;
@JsonProperty("password") @JsonProperty("password")
private String password; private String password;
@JsonProperty("phone") @JsonProperty("phone")
private String phone; private String phone;
@JsonProperty("userStatus") @JsonProperty("userStatus")
private Integer userStatus; private Integer userStatus;
public User id(Long id) { public User id(Long id) {

View File

@ -6,5 +6,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6" scalaVersion := "2.12.6"
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final" libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
libraryDependencies += guice libraryDependencies += guice

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category { public class Category {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("name") @JsonProperty("name")
private String name; private String name;
public Category id(Long id) { public Category id(Long id) {

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse { public class ModelApiResponse {
@JsonProperty("code") @JsonProperty("code")
private Integer code; private Integer code;
@JsonProperty("type") @JsonProperty("type")
private String type; private String type;
@JsonProperty("message") @JsonProperty("message")
private String message; private String message;
public ModelApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order { public class Order {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("petId") @JsonProperty("petId")
private Long petId; private Long petId;
@JsonProperty("quantity") @JsonProperty("quantity")
private Integer quantity; private Integer quantity;
@JsonProperty("shipDate") @JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate; private OffsetDateTime shipDate;
/** /**
@ -58,9 +63,11 @@ public class Order {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
@JsonProperty("complete") @JsonProperty("complete")
private Boolean complete = false; private Boolean complete = false;
public Order id(Long id) { public Order id(Long id) {
@ -123,7 +130,6 @@ public class Order {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@Valid
public OffsetDateTime getShipDate() { public OffsetDateTime getShipDate() {
return shipDate; return shipDate;
} }

View File

@ -16,18 +16,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"}) @SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Pet { public class Pet {
@JsonProperty("id") @JsonProperty("id")
private Long id; private Long id;
@JsonProperty("category") @JsonProperty("category")
@Valid
private Category category; private Category category;
@JsonProperty("name") @JsonProperty("name")
@NotNull
private String name; private String name;
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
@NotNull
private List<String> photoUrls = new ArrayList<>(); private List<String> photoUrls = new ArrayList<>();
@JsonProperty("tags") @JsonProperty("tags")
@Valid
private List<Tag> tags = null; private List<Tag> tags = null;
/** /**
@ -64,6 +73,7 @@ public class Pet {
} }
@JsonProperty("status") @JsonProperty("status")
private StatusEnum status; private StatusEnum status;
public Pet id(Long id) { public Pet id(Long id) {
@ -92,7 +102,6 @@ public class Pet {
* Get category * Get category
* @return category * @return category
**/ **/
@Valid
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -110,7 +119,6 @@ public class Pet {
* Get name * Get name
* @return name * @return name
**/ **/
@NotNull
public String getName() { public String getName() {
return name; return name;
} }
@ -133,7 +141,6 @@ public class Pet {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
} }
@ -159,7 +166,6 @@ public class Pet {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@Valid
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }

Some files were not shown because too many files have changed in this diff Show More