update samples

This commit is contained in:
William Cheng
2021-07-31 21:28:10 +08:00
parent 831034bb24
commit 70982ddc75
6 changed files with 27 additions and 27 deletions

View File

@@ -30,15 +30,16 @@ import javax.json.bind.annotation.JsonbProperty;
public class Category {
@JsonbProperty("id")
private Long id;
@JsonbProperty("name")
private String name;
/**
* Get id
* @return id
**/
@JsonbProperty("id")
public Long getId() {
return id;
}
@@ -59,7 +60,6 @@ public class Category {
* Get name
* @return name
**/
@JsonbProperty("name")
public String getName() {
return name;
}

View File

@@ -30,17 +30,19 @@ import javax.json.bind.annotation.JsonbProperty;
public class ModelApiResponse {
@JsonbProperty("code")
private Integer code;
@JsonbProperty("type")
private String type;
@JsonbProperty("message")
private String message;
/**
* Get code
* @return code
**/
@JsonbProperty("code")
public Integer getCode() {
return code;
}
@@ -61,7 +63,6 @@ public class ModelApiResponse {
* Get type
* @return type
**/
@JsonbProperty("type")
public String getType() {
return type;
}
@@ -82,7 +83,6 @@ public class ModelApiResponse {
* Get message
* @return message
**/
@JsonbProperty("message")
public String getMessage() {
return message;
}

View File

@@ -31,12 +31,16 @@ import javax.json.bind.annotation.JsonbProperty;
public class Order {
@JsonbProperty("id")
private Long id;
@JsonbProperty("petId")
private Long petId;
@JsonbProperty("quantity")
private Integer quantity;
@JsonbProperty("shipDate")
private Date shipDate;
@JsonbTypeSerializer(StatusEnum.Serializer.class)
@@ -84,15 +88,16 @@ public class Order {
/**
* Order Status
**/
@JsonbProperty("status")
private StatusEnum status;
@JsonbProperty("complete")
private Boolean complete = false;
/**
* Get id
* @return id
**/
@JsonbProperty("id")
public Long getId() {
return id;
}
@@ -113,7 +118,6 @@ public class Order {
* Get petId
* @return petId
**/
@JsonbProperty("petId")
public Long getPetId() {
return petId;
}
@@ -134,7 +138,6 @@ public class Order {
* Get quantity
* @return quantity
**/
@JsonbProperty("quantity")
public Integer getQuantity() {
return quantity;
}
@@ -155,7 +158,6 @@ public class Order {
* Get shipDate
* @return shipDate
**/
@JsonbProperty("shipDate")
public Date getShipDate() {
return shipDate;
}
@@ -176,7 +178,6 @@ public class Order {
* Order Status
* @return status
**/
@JsonbProperty("status")
public StatusEnum getStatus() {
return status;
}
@@ -197,7 +198,6 @@ public class Order {
* Get complete
* @return complete
**/
@JsonbProperty("complete")
public Boolean getComplete() {
return complete;
}

View File

@@ -34,14 +34,19 @@ import javax.json.bind.annotation.JsonbProperty;
public class Pet {
@JsonbProperty("id")
private Long id;
@JsonbProperty("category")
private Category category;
@JsonbProperty("name")
private String name;
@JsonbProperty("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@JsonbProperty("tags")
private List<Tag> tags = null;
@JsonbTypeSerializer(StatusEnum.Serializer.class)
@@ -89,13 +94,13 @@ public class Pet {
/**
* pet status in the store
**/
@JsonbProperty("status")
private StatusEnum status;
/**
* Get id
* @return id
**/
@JsonbProperty("id")
public Long getId() {
return id;
}
@@ -116,7 +121,6 @@ public class Pet {
* Get category
* @return category
**/
@JsonbProperty("category")
public Category getCategory() {
return category;
}
@@ -137,7 +141,6 @@ public class Pet {
* Get name
* @return name
**/
@JsonbProperty("name")
public String getName() {
return name;
}
@@ -158,7 +161,6 @@ public class Pet {
* Get photoUrls
* @return photoUrls
**/
@JsonbProperty("photoUrls")
public List<String> getPhotoUrls() {
return photoUrls;
}
@@ -184,7 +186,6 @@ public class Pet {
* Get tags
* @return tags
**/
@JsonbProperty("tags")
public List<Tag> getTags() {
return tags;
}
@@ -210,7 +211,6 @@ public class Pet {
* pet status in the store
* @return status
**/
@JsonbProperty("status")
public StatusEnum getStatus() {
return status;
}

View File

@@ -30,15 +30,16 @@ import javax.json.bind.annotation.JsonbProperty;
public class Tag {
@JsonbProperty("id")
private Long id;
@JsonbProperty("name")
private String name;
/**
* Get id
* @return id
**/
@JsonbProperty("id")
public Long getId() {
return id;
}
@@ -59,7 +60,6 @@ public class Tag {
* Get name
* @return name
**/
@JsonbProperty("name")
public String getName() {
return name;
}

View File

@@ -30,30 +30,37 @@ import javax.json.bind.annotation.JsonbProperty;
public class User {
@JsonbProperty("id")
private Long id;
@JsonbProperty("username")
private String username;
@JsonbProperty("firstName")
private String firstName;
@JsonbProperty("lastName")
private String lastName;
@JsonbProperty("email")
private String email;
@JsonbProperty("password")
private String password;
@JsonbProperty("phone")
private String phone;
/**
* User Status
**/
@JsonbProperty("userStatus")
private Integer userStatus;
/**
* Get id
* @return id
**/
@JsonbProperty("id")
public Long getId() {
return id;
}
@@ -74,7 +81,6 @@ public class User {
* Get username
* @return username
**/
@JsonbProperty("username")
public String getUsername() {
return username;
}
@@ -95,7 +101,6 @@ public class User {
* Get firstName
* @return firstName
**/
@JsonbProperty("firstName")
public String getFirstName() {
return firstName;
}
@@ -116,7 +121,6 @@ public class User {
* Get lastName
* @return lastName
**/
@JsonbProperty("lastName")
public String getLastName() {
return lastName;
}
@@ -137,7 +141,6 @@ public class User {
* Get email
* @return email
**/
@JsonbProperty("email")
public String getEmail() {
return email;
}
@@ -158,7 +161,6 @@ public class User {
* Get password
* @return password
**/
@JsonbProperty("password")
public String getPassword() {
return password;
}
@@ -179,7 +181,6 @@ public class User {
* Get phone
* @return phone
**/
@JsonbProperty("phone")
public String getPhone() {
return phone;
}
@@ -200,7 +201,6 @@ public class User {
* User Status
* @return userStatus
**/
@JsonbProperty("userStatus")
public Integer getUserStatus() {
return userStatus;
}