[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"
{{/useSwaggerUI}}
{{#useBeanValidation}}
libraryDependencies += "javax.validation" % "validation-api" % "1.1.0.Final"
libraryDependencies += "javax.validation" % "validation-api" % "2.0.1.Final"
{{/useBeanValidation}}
libraryDependencies += guice

View File

@ -26,9 +26,15 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
@SerializedName("{{baseName}}")
{{/gson}}
{{#isContainer}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#required}} = {{{defaultValue}}}{{/required}}{{^required}} = null{{/required}};
{{/isContainer}}
{{^isContainer}}
{{#useBeanValidation}}
{{>beanValidation}}
{{/useBeanValidation}}
private {{{datatypeWithEnum}}} {{name}}{{#defaultValue}} = {{{.}}}{{/defaultValue}};
{{/isContainer}}
@ -78,10 +84,10 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{/maximum}}
* @return {{name}}
**/
{{#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}};
}

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -49,6 +49,7 @@ public class BigCat extends Cat {
}
@JsonProperty("kind")
private KindEnum kind;
public BigCat kind(KindEnum kind) {
@ -60,7 +61,7 @@ public class BigCat extends Cat {
* Get kind
* @return kind
**/
public KindEnum getKind() {
public KindEnum getKind() {
return kind;
}

View File

@ -47,6 +47,7 @@ public class BigCatAllOf {
}
@JsonProperty("kind")
private KindEnum kind;
public BigCatAllOf kind(KindEnum kind) {
@ -58,7 +59,7 @@ public class BigCatAllOf {
* Get kind
* @return kind
**/
public KindEnum getKind() {
public KindEnum getKind() {
return kind;
}

View File

@ -12,21 +12,27 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Capitalization {
@JsonProperty("smallCamel")
private String smallCamel;
@JsonProperty("CapitalCamel")
private String capitalCamel;
@JsonProperty("small_Snake")
private String smallSnake;
@JsonProperty("Capital_Snake")
private String capitalSnake;
@JsonProperty("SCA_ETH_Flow_Points")
private String scAETHFlowPoints;
@JsonProperty("ATT_NAME")
private String ATT_NAME;
public Capitalization smallCamel(String smallCamel) {
@ -38,7 +44,7 @@ public class Capitalization {
* Get smallCamel
* @return smallCamel
**/
public String getSmallCamel() {
public String getSmallCamel() {
return smallCamel;
}
@ -55,7 +61,7 @@ public class Capitalization {
* Get capitalCamel
* @return capitalCamel
**/
public String getCapitalCamel() {
public String getCapitalCamel() {
return capitalCamel;
}
@ -72,7 +78,7 @@ public class Capitalization {
* Get smallSnake
* @return smallSnake
**/
public String getSmallSnake() {
public String getSmallSnake() {
return smallSnake;
}
@ -89,7 +95,7 @@ public class Capitalization {
* Get capitalSnake
* @return capitalSnake
**/
public String getCapitalSnake() {
public String getCapitalSnake() {
return capitalSnake;
}
@ -106,7 +112,7 @@ public class Capitalization {
* Get scAETHFlowPoints
* @return scAETHFlowPoints
**/
public String getScAETHFlowPoints() {
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
@ -123,7 +129,7 @@ public class Capitalization {
* Name of the pet
* @return ATT_NAME
**/
public String getATTNAME() {
public String getATTNAME() {
return ATT_NAME;
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class HasOnlyReadOnly {
@JsonProperty("bar")
private String bar;
@JsonProperty("foo")
private String foo;
public HasOnlyReadOnly bar(String bar) {
@ -26,7 +28,7 @@ public class HasOnlyReadOnly {
* Get bar
* @return bar
**/
public String getBar() {
public String getBar() {
return bar;
}
@ -43,7 +45,7 @@ public class HasOnlyReadOnly {
* Get foo
* @return foo
**/
public String getFoo() {
public String getFoo() {
return foo;
}

View File

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

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Model200Response {
@JsonProperty("name")
private Integer name;
@JsonProperty("class")
private String propertyClass;
public Model200Response name(Integer name) {
@ -26,7 +28,7 @@ public class Model200Response {
* Get name
* @return name
**/
public Integer getName() {
public Integer getName() {
return name;
}
@ -43,7 +45,7 @@ public class Model200Response {
* Get propertyClass
* @return propertyClass
**/
public String getPropertyClass() {
public String getPropertyClass() {
return propertyClass;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

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

View File

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

View File

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

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ReadOnlyFirst {
@JsonProperty("bar")
private String bar;
@JsonProperty("baz")
private String baz;
public ReadOnlyFirst bar(String bar) {
@ -26,7 +28,7 @@ public class ReadOnlyFirst {
* Get bar
* @return bar
**/
public String getBar() {
public String getBar() {
return bar;
}
@ -43,7 +45,7 @@ public class ReadOnlyFirst {
* Get baz
* @return baz
**/
public String getBaz() {
public String getBaz() {
return baz;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

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

View File

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

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -15,90 +15,124 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class XmlItem {
@JsonProperty("attribute_string")
private String attributeString;
@JsonProperty("attribute_number")
@Valid
private BigDecimal attributeNumber;
@JsonProperty("attribute_integer")
private Integer attributeInteger;
@JsonProperty("attribute_boolean")
private Boolean attributeBoolean;
@JsonProperty("wrapped_array")
private List<Integer> wrappedArray = null;
@JsonProperty("name_string")
private String nameString;
@JsonProperty("name_number")
@Valid
private BigDecimal nameNumber;
@JsonProperty("name_integer")
private Integer nameInteger;
@JsonProperty("name_boolean")
private Boolean nameBoolean;
@JsonProperty("name_array")
private List<Integer> nameArray = null;
@JsonProperty("name_wrapped_array")
private List<Integer> nameWrappedArray = null;
@JsonProperty("prefix_string")
private String prefixString;
@JsonProperty("prefix_number")
@Valid
private BigDecimal prefixNumber;
@JsonProperty("prefix_integer")
private Integer prefixInteger;
@JsonProperty("prefix_boolean")
private Boolean prefixBoolean;
@JsonProperty("prefix_array")
private List<Integer> prefixArray = null;
@JsonProperty("prefix_wrapped_array")
private List<Integer> prefixWrappedArray = null;
@JsonProperty("namespace_string")
private String namespaceString;
@JsonProperty("namespace_number")
@Valid
private BigDecimal namespaceNumber;
@JsonProperty("namespace_integer")
private Integer namespaceInteger;
@JsonProperty("namespace_boolean")
private Boolean namespaceBoolean;
@JsonProperty("namespace_array")
private List<Integer> namespaceArray = null;
@JsonProperty("namespace_wrapped_array")
private List<Integer> namespaceWrappedArray = null;
@JsonProperty("prefix_ns_string")
private String prefixNsString;
@JsonProperty("prefix_ns_number")
@Valid
private BigDecimal prefixNsNumber;
@JsonProperty("prefix_ns_integer")
private Integer prefixNsInteger;
@JsonProperty("prefix_ns_boolean")
private Boolean prefixNsBoolean;
@JsonProperty("prefix_ns_array")
private List<Integer> prefixNsArray = null;
@JsonProperty("prefix_ns_wrapped_array")
private List<Integer> prefixNsWrappedArray = null;
public XmlItem attributeString(String attributeString) {
@ -110,7 +144,7 @@ public class XmlItem {
* Get attributeString
* @return attributeString
**/
public String getAttributeString() {
public String getAttributeString() {
return attributeString;
}
@ -127,7 +161,6 @@ public class XmlItem {
* Get attributeNumber
* @return attributeNumber
**/
@Valid
public BigDecimal getAttributeNumber() {
return attributeNumber;
}
@ -145,7 +178,7 @@ public class XmlItem {
* Get attributeInteger
* @return attributeInteger
**/
public Integer getAttributeInteger() {
public Integer getAttributeInteger() {
return attributeInteger;
}
@ -162,7 +195,7 @@ public class XmlItem {
* Get attributeBoolean
* @return attributeBoolean
**/
public Boolean getAttributeBoolean() {
public Boolean getAttributeBoolean() {
return attributeBoolean;
}
@ -187,7 +220,7 @@ public class XmlItem {
* Get wrappedArray
* @return wrappedArray
**/
public List<Integer> getWrappedArray() {
public List<Integer> getWrappedArray() {
return wrappedArray;
}
@ -204,7 +237,7 @@ public class XmlItem {
* Get nameString
* @return nameString
**/
public String getNameString() {
public String getNameString() {
return nameString;
}
@ -221,7 +254,6 @@ public class XmlItem {
* Get nameNumber
* @return nameNumber
**/
@Valid
public BigDecimal getNameNumber() {
return nameNumber;
}
@ -239,7 +271,7 @@ public class XmlItem {
* Get nameInteger
* @return nameInteger
**/
public Integer getNameInteger() {
public Integer getNameInteger() {
return nameInteger;
}
@ -256,7 +288,7 @@ public class XmlItem {
* Get nameBoolean
* @return nameBoolean
**/
public Boolean getNameBoolean() {
public Boolean getNameBoolean() {
return nameBoolean;
}
@ -281,7 +313,7 @@ public class XmlItem {
* Get nameArray
* @return nameArray
**/
public List<Integer> getNameArray() {
public List<Integer> getNameArray() {
return nameArray;
}
@ -306,7 +338,7 @@ public class XmlItem {
* Get nameWrappedArray
* @return nameWrappedArray
**/
public List<Integer> getNameWrappedArray() {
public List<Integer> getNameWrappedArray() {
return nameWrappedArray;
}
@ -323,7 +355,7 @@ public class XmlItem {
* Get prefixString
* @return prefixString
**/
public String getPrefixString() {
public String getPrefixString() {
return prefixString;
}
@ -340,7 +372,6 @@ public class XmlItem {
* Get prefixNumber
* @return prefixNumber
**/
@Valid
public BigDecimal getPrefixNumber() {
return prefixNumber;
}
@ -358,7 +389,7 @@ public class XmlItem {
* Get prefixInteger
* @return prefixInteger
**/
public Integer getPrefixInteger() {
public Integer getPrefixInteger() {
return prefixInteger;
}
@ -375,7 +406,7 @@ public class XmlItem {
* Get prefixBoolean
* @return prefixBoolean
**/
public Boolean getPrefixBoolean() {
public Boolean getPrefixBoolean() {
return prefixBoolean;
}
@ -400,7 +431,7 @@ public class XmlItem {
* Get prefixArray
* @return prefixArray
**/
public List<Integer> getPrefixArray() {
public List<Integer> getPrefixArray() {
return prefixArray;
}
@ -425,7 +456,7 @@ public class XmlItem {
* Get prefixWrappedArray
* @return prefixWrappedArray
**/
public List<Integer> getPrefixWrappedArray() {
public List<Integer> getPrefixWrappedArray() {
return prefixWrappedArray;
}
@ -442,7 +473,7 @@ public class XmlItem {
* Get namespaceString
* @return namespaceString
**/
public String getNamespaceString() {
public String getNamespaceString() {
return namespaceString;
}
@ -459,7 +490,6 @@ public class XmlItem {
* Get namespaceNumber
* @return namespaceNumber
**/
@Valid
public BigDecimal getNamespaceNumber() {
return namespaceNumber;
}
@ -477,7 +507,7 @@ public class XmlItem {
* Get namespaceInteger
* @return namespaceInteger
**/
public Integer getNamespaceInteger() {
public Integer getNamespaceInteger() {
return namespaceInteger;
}
@ -494,7 +524,7 @@ public class XmlItem {
* Get namespaceBoolean
* @return namespaceBoolean
**/
public Boolean getNamespaceBoolean() {
public Boolean getNamespaceBoolean() {
return namespaceBoolean;
}
@ -519,7 +549,7 @@ public class XmlItem {
* Get namespaceArray
* @return namespaceArray
**/
public List<Integer> getNamespaceArray() {
public List<Integer> getNamespaceArray() {
return namespaceArray;
}
@ -544,7 +574,7 @@ public class XmlItem {
* Get namespaceWrappedArray
* @return namespaceWrappedArray
**/
public List<Integer> getNamespaceWrappedArray() {
public List<Integer> getNamespaceWrappedArray() {
return namespaceWrappedArray;
}
@ -561,7 +591,7 @@ public class XmlItem {
* Get prefixNsString
* @return prefixNsString
**/
public String getPrefixNsString() {
public String getPrefixNsString() {
return prefixNsString;
}
@ -578,7 +608,6 @@ public class XmlItem {
* Get prefixNsNumber
* @return prefixNsNumber
**/
@Valid
public BigDecimal getPrefixNsNumber() {
return prefixNsNumber;
}
@ -596,7 +625,7 @@ public class XmlItem {
* Get prefixNsInteger
* @return prefixNsInteger
**/
public Integer getPrefixNsInteger() {
public Integer getPrefixNsInteger() {
return prefixNsInteger;
}
@ -613,7 +642,7 @@ public class XmlItem {
* Get prefixNsBoolean
* @return prefixNsBoolean
**/
public Boolean getPrefixNsBoolean() {
public Boolean getPrefixNsBoolean() {
return prefixNsBoolean;
}
@ -638,7 +667,7 @@ public class XmlItem {
* Get prefixNsArray
* @return prefixNsArray
**/
public List<Integer> getPrefixNsArray() {
public List<Integer> getPrefixNsArray() {
return prefixNsArray;
}
@ -663,7 +692,7 @@ public class XmlItem {
* Get prefixNsWrappedArray
* @return prefixNsWrappedArray
**/
public List<Integer> getPrefixNsWrappedArray() {
public List<Integer> getPrefixNsWrappedArray() {
return prefixNsWrappedArray;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

@ -25,7 +25,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -42,7 +42,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -28,7 +28,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -45,7 +45,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -62,7 +62,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -71,7 +71,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -88,7 +88,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -105,7 +105,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -122,7 +122,7 @@ public class Order {
* Get shipDate
* @return shipDate
**/
public OffsetDateTime getShipDate() {
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -139,7 +139,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -156,7 +156,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

@ -74,7 +74,7 @@ public class Pet {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -91,7 +91,7 @@ public class Pet {
* Get category
* @return category
**/
public Category getCategory() {
public Category getCategory() {
return category;
}
@ -108,7 +108,7 @@ public class Pet {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}
@ -130,7 +130,7 @@ public class Pet {
* Get photoUrls
* @return photoUrls
**/
public List<String> getPhotoUrls() {
public List<String> getPhotoUrls() {
return photoUrls;
}
@ -155,7 +155,7 @@ public class Pet {
* Get tags
* @return tags
**/
public List<Tag> getTags() {
public List<Tag> getTags() {
return tags;
}
@ -172,7 +172,7 @@ public class Pet {
* pet status in the store
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}

View File

@ -25,7 +25,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -42,7 +42,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -43,7 +43,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -60,7 +60,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -77,7 +77,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -94,7 +94,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -111,7 +111,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -128,7 +128,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -145,7 +145,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -162,7 +162,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,27 +12,35 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class User {
@JsonProperty("id")
private Long id;
@JsonProperty("username")
private String username;
@JsonProperty("firstName")
private String firstName;
@JsonProperty("lastName")
private String lastName;
@JsonProperty("email")
private String email;
@JsonProperty("password")
private String password;
@JsonProperty("phone")
private String phone;
@JsonProperty("userStatus")
private Integer userStatus;
public User id(Long id) {
@ -44,7 +52,7 @@ public class User {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -61,7 +69,7 @@ public class User {
* Get username
* @return username
**/
public String getUsername() {
public String getUsername() {
return username;
}
@ -78,7 +86,7 @@ public class User {
* Get firstName
* @return firstName
**/
public String getFirstName() {
public String getFirstName() {
return firstName;
}
@ -95,7 +103,7 @@ public class User {
* Get lastName
* @return lastName
**/
public String getLastName() {
public String getLastName() {
return lastName;
}
@ -112,7 +120,7 @@ public class User {
* Get email
* @return email
**/
public String getEmail() {
public String getEmail() {
return email;
}
@ -129,7 +137,7 @@ public class User {
* Get password
* @return password
**/
public String getPassword() {
public String getPassword() {
return password;
}
@ -146,7 +154,7 @@ public class User {
* Get phone
* @return phone
**/
public String getPhone() {
public String getPhone() {
return phone;
}
@ -163,7 +171,7 @@ public class User {
* User Status
* @return userStatus
**/
public Integer getUserStatus() {
public Integer getUserStatus() {
return userStatus;
}

View File

@ -7,5 +7,5 @@ lazy val root = (project in file(".")).enablePlugins(PlayJava)
scalaVersion := "2.12.6"
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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Category {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Category id(Long id) {
@ -26,7 +28,7 @@ public class Category {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Category {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

View File

@ -12,12 +12,15 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class ModelApiResponse {
@JsonProperty("code")
private Integer code;
@JsonProperty("type")
private String type;
@JsonProperty("message")
private String message;
public ModelApiResponse code(Integer code) {
@ -29,7 +32,7 @@ public class ModelApiResponse {
* Get code
* @return code
**/
public Integer getCode() {
public Integer getCode() {
return code;
}
@ -46,7 +49,7 @@ public class ModelApiResponse {
* Get type
* @return type
**/
public String getType() {
public String getType() {
return type;
}
@ -63,7 +66,7 @@ public class ModelApiResponse {
* Get message
* @return message
**/
public String getMessage() {
public String getMessage() {
return message;
}

View File

@ -13,15 +13,20 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Order {
@JsonProperty("id")
private Long id;
@JsonProperty("petId")
private Long petId;
@JsonProperty("quantity")
private Integer quantity;
@JsonProperty("shipDate")
@Valid
private OffsetDateTime shipDate;
/**
@ -58,9 +63,11 @@ public class Order {
}
@JsonProperty("status")
private StatusEnum status;
@JsonProperty("complete")
private Boolean complete = false;
public Order id(Long id) {
@ -72,7 +79,7 @@ public class Order {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -89,7 +96,7 @@ public class Order {
* Get petId
* @return petId
**/
public Long getPetId() {
public Long getPetId() {
return petId;
}
@ -106,7 +113,7 @@ public class Order {
* Get quantity
* @return quantity
**/
public Integer getQuantity() {
public Integer getQuantity() {
return quantity;
}
@ -123,7 +130,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@Valid
public OffsetDateTime getShipDate() {
return shipDate;
}
@ -141,7 +147,7 @@ public class Order {
* Order Status
* @return status
**/
public StatusEnum getStatus() {
public StatusEnum getStatus() {
return status;
}
@ -158,7 +164,7 @@ public class Order {
* Get complete
* @return complete
**/
public Boolean getComplete() {
public Boolean getComplete() {
return complete;
}

View File

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

View File

@ -12,9 +12,11 @@ import javax.validation.constraints.*;
@SuppressWarnings({"UnusedReturnValue", "WeakerAccess"})
public class Tag {
@JsonProperty("id")
private Long id;
@JsonProperty("name")
private String name;
public Tag id(Long id) {
@ -26,7 +28,7 @@ public class Tag {
* Get id
* @return id
**/
public Long getId() {
public Long getId() {
return id;
}
@ -43,7 +45,7 @@ public class Tag {
* Get name
* @return name
**/
public String getName() {
public String getName() {
return name;
}

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