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 { public class Category {
@JsonbProperty("id")
private Long id; private Long id;
@JsonbProperty("name")
private String name; private String name;
/** /**
* Get id * Get id
* @return id * @return id
**/ **/
@JsonbProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -59,7 +60,6 @@ public class Category {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonbProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

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

View File

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

View File

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

View File

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

View File

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