[Java][JAX-RS-CXF] Add JsonProperty to POJO (#6710)

* Included Open Systems International in the list of companies using Swagger Codegen

* Force Jackson to use the real names of the properties of the Data type defined in the YAML

* Update of the Petstore CXF server sample

* Update of the Petstore CXF client sample

* Update of the Petstore CXF server annotated base path sample

* Update of the Petstore CXF server non spring application sample

* Changed {{name}} for {{baseName}} following the correction posted by @wing328

* Update of the Petstore CXF server sample
This commit is contained in:
Gustavo Paz 2017-10-19 03:58:16 -05:00 committed by wing328
parent e4abddf253
commit d37894199b
49 changed files with 217 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
{{#withXml}} {{#withXml}}
@XmlAccessorType(XmlAccessType.FIELD) @XmlAccessorType(XmlAccessType.FIELD)
@ -46,6 +47,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {
{{/maximum}} {{/maximum}}
* @return {{name}} * @return {{name}}
**/ **/
@JsonProperty("{{baseName}}")
{{#vendorExtensions.extraAnnotation}} {{#vendorExtensions.extraAnnotation}}
{{{vendorExtensions.extraAnnotation}}} {{{vendorExtensions.extraAnnotation}}}
{{/vendorExtensions.extraAnnotation}} {{/vendorExtensions.extraAnnotation}}

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A category for a pet") @ApiModel(description="A category for a pet")
public class Category { public class Category {
@ -24,6 +25,7 @@ public class Category {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -41,6 +43,7 @@ public class Category {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Describes the result of uploading an image resource") @ApiModel(description="Describes the result of uploading an image resource")
public class ModelApiResponse { public class ModelApiResponse {
@ -26,6 +27,7 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
**/ **/
@JsonProperty("code")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@ -43,6 +45,7 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
**/ **/
@JsonProperty("type")
public String getType() { public String getType() {
return type; return type;
} }
@ -60,6 +63,7 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
**/ **/
@JsonProperty("message")
public String getMessage() { public String getMessage() {
return message; return message;
} }

View File

@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="An order for a pets from the pet store") @ApiModel(description="An order for a pets from the pet store")
public class Order { public class Order {
@ -66,6 +67,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -83,6 +85,7 @@ public enum StatusEnum {
* Get petId * Get petId
* @return petId * @return petId
**/ **/
@JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@ -100,6 +103,7 @@ public enum StatusEnum {
* Get quantity * Get quantity
* @return quantity * @return quantity
**/ **/
@JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@ -117,6 +121,7 @@ public enum StatusEnum {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
return shipDate; return shipDate;
} }
@ -134,6 +139,7 @@ public enum StatusEnum {
* Order Status * Order Status
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@ -151,6 +157,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
@JsonProperty("complete")
public Boolean isComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A pet for sale in the pet store") @ApiModel(description="A pet for sale in the pet store")
public class Pet { public class Pet {
@ -69,6 +70,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -86,6 +88,7 @@ public enum StatusEnum {
* Get category * Get category
* @return category * @return category
**/ **/
@JsonProperty("category")
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -103,6 +106,7 @@ public enum StatusEnum {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
@NotNull @NotNull
public String getName() { public String getName() {
return name; return name;
@ -121,6 +125,7 @@ public enum StatusEnum {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@JsonProperty("photoUrls")
@NotNull @NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
@ -144,6 +149,7 @@ public enum StatusEnum {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@ -166,6 +172,7 @@ public enum StatusEnum {
* pet status in the store * pet status in the store
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A tag for a pet") @ApiModel(description="A tag for a pet")
public class Tag { public class Tag {
@ -24,6 +25,7 @@ public class Tag {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -41,6 +43,7 @@ public class Tag {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A User who is purchasing from the pet store") @ApiModel(description="A User who is purchasing from the pet store")
public class User { public class User {
@ -36,6 +37,7 @@ public class User {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -53,6 +55,7 @@ public class User {
* Get username * Get username
* @return username * @return username
**/ **/
@JsonProperty("username")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@ -70,6 +73,7 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
**/ **/
@JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@ -87,6 +91,7 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
**/ **/
@JsonProperty("lastName")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@ -104,6 +109,7 @@ public class User {
* Get email * Get email
* @return email * @return email
**/ **/
@JsonProperty("email")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@ -121,6 +127,7 @@ public class User {
* Get password * Get password
* @return password * @return password
**/ **/
@JsonProperty("password")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@ -138,6 +145,7 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
**/ **/
@JsonProperty("phone")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@ -155,6 +163,7 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
**/ **/
@JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A category for a pet") @ApiModel(description="A category for a pet")
public class Category { public class Category {
@ -24,6 +25,7 @@ public class Category {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -41,6 +43,7 @@ public class Category {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Describes the result of uploading an image resource") @ApiModel(description="Describes the result of uploading an image resource")
public class ModelApiResponse { public class ModelApiResponse {
@ -26,6 +27,7 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
**/ **/
@JsonProperty("code")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@ -43,6 +45,7 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
**/ **/
@JsonProperty("type")
public String getType() { public String getType() {
return type; return type;
} }
@ -60,6 +63,7 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
**/ **/
@JsonProperty("message")
public String getMessage() { public String getMessage() {
return message; return message;
} }

View File

@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="An order for a pets from the pet store") @ApiModel(description="An order for a pets from the pet store")
public class Order { public class Order {
@ -66,6 +67,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -83,6 +85,7 @@ public enum StatusEnum {
* Get petId * Get petId
* @return petId * @return petId
**/ **/
@JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@ -100,6 +103,7 @@ public enum StatusEnum {
* Get quantity * Get quantity
* @return quantity * @return quantity
**/ **/
@JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@ -117,6 +121,7 @@ public enum StatusEnum {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
return shipDate; return shipDate;
} }
@ -134,6 +139,7 @@ public enum StatusEnum {
* Order Status * Order Status
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@ -151,6 +157,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
@JsonProperty("complete")
public Boolean isComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A pet for sale in the pet store") @ApiModel(description="A pet for sale in the pet store")
public class Pet { public class Pet {
@ -69,6 +70,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -86,6 +88,7 @@ public enum StatusEnum {
* Get category * Get category
* @return category * @return category
**/ **/
@JsonProperty("category")
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -103,6 +106,7 @@ public enum StatusEnum {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
@NotNull @NotNull
public String getName() { public String getName() {
return name; return name;
@ -121,6 +125,7 @@ public enum StatusEnum {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@JsonProperty("photoUrls")
@NotNull @NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
@ -144,6 +149,7 @@ public enum StatusEnum {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@ -166,6 +172,7 @@ public enum StatusEnum {
* pet status in the store * pet status in the store
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A tag for a pet") @ApiModel(description="A tag for a pet")
public class Tag { public class Tag {
@ -24,6 +25,7 @@ public class Tag {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -41,6 +43,7 @@ public class Tag {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A User who is purchasing from the pet store") @ApiModel(description="A User who is purchasing from the pet store")
public class User { public class User {
@ -36,6 +37,7 @@ public class User {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -53,6 +55,7 @@ public class User {
* Get username * Get username
* @return username * @return username
**/ **/
@JsonProperty("username")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@ -70,6 +73,7 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
**/ **/
@JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@ -87,6 +91,7 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
**/ **/
@JsonProperty("lastName")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@ -104,6 +109,7 @@ public class User {
* Get email * Get email
* @return email * @return email
**/ **/
@JsonProperty("email")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@ -121,6 +127,7 @@ public class User {
* Get password * Get password
* @return password * @return password
**/ **/
@JsonProperty("password")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@ -138,6 +145,7 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
**/ **/
@JsonProperty("phone")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@ -155,6 +163,7 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
**/ **/
@JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A category for a pet") @ApiModel(description="A category for a pet")
public class Category { public class Category {
@ -24,6 +25,7 @@ public class Category {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -41,6 +43,7 @@ public class Category {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Describes the result of uploading an image resource") @ApiModel(description="Describes the result of uploading an image resource")
public class ModelApiResponse { public class ModelApiResponse {
@ -26,6 +27,7 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
**/ **/
@JsonProperty("code")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@ -43,6 +45,7 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
**/ **/
@JsonProperty("type")
public String getType() { public String getType() {
return type; return type;
} }
@ -60,6 +63,7 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
**/ **/
@JsonProperty("message")
public String getMessage() { public String getMessage() {
return message; return message;
} }

View File

@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="An order for a pets from the pet store") @ApiModel(description="An order for a pets from the pet store")
public class Order { public class Order {
@ -66,6 +67,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -83,6 +85,7 @@ public enum StatusEnum {
* Get petId * Get petId
* @return petId * @return petId
**/ **/
@JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@ -100,6 +103,7 @@ public enum StatusEnum {
* Get quantity * Get quantity
* @return quantity * @return quantity
**/ **/
@JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@ -117,6 +121,7 @@ public enum StatusEnum {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
return shipDate; return shipDate;
} }
@ -134,6 +139,7 @@ public enum StatusEnum {
* Order Status * Order Status
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@ -151,6 +157,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
@JsonProperty("complete")
public Boolean isComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -15,6 +15,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A pet for sale in the pet store") @ApiModel(description="A pet for sale in the pet store")
public class Pet { public class Pet {
@ -69,6 +70,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -86,6 +88,7 @@ public enum StatusEnum {
* Get category * Get category
* @return category * @return category
**/ **/
@JsonProperty("category")
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -103,6 +106,7 @@ public enum StatusEnum {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
@NotNull @NotNull
public String getName() { public String getName() {
return name; return name;
@ -121,6 +125,7 @@ public enum StatusEnum {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@JsonProperty("photoUrls")
@NotNull @NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
@ -144,6 +149,7 @@ public enum StatusEnum {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@ -166,6 +172,7 @@ public enum StatusEnum {
* pet status in the store * pet status in the store
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A tag for a pet") @ApiModel(description="A tag for a pet")
public class Tag { public class Tag {
@ -24,6 +25,7 @@ public class Tag {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -41,6 +43,7 @@ public class Tag {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="A User who is purchasing from the pet store") @ApiModel(description="A User who is purchasing from the pet store")
public class User { public class User {
@ -36,6 +37,7 @@ public class User {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -53,6 +55,7 @@ public class User {
* Get username * Get username
* @return username * @return username
**/ **/
@JsonProperty("username")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@ -70,6 +73,7 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
**/ **/
@JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@ -87,6 +91,7 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
**/ **/
@JsonProperty("lastName")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@ -104,6 +109,7 @@ public class User {
* Get email * Get email
* @return email * @return email
**/ **/
@JsonProperty("email")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@ -121,6 +127,7 @@ public class User {
* Get password * Get password
* @return password * @return password
**/ **/
@JsonProperty("password")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@ -138,6 +145,7 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
**/ **/
@JsonProperty("phone")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@ -155,6 +163,7 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
**/ **/
@JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }

View File

@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class AdditionalPropertiesClass { public class AdditionalPropertiesClass {
@ -25,6 +26,7 @@ public class AdditionalPropertiesClass {
* Get mapProperty * Get mapProperty
* @return mapProperty * @return mapProperty
**/ **/
@JsonProperty("map_property")
public Map<String, String> getMapProperty() { public Map<String, String> getMapProperty() {
return mapProperty; return mapProperty;
} }
@ -47,6 +49,7 @@ public class AdditionalPropertiesClass {
* Get mapOfMapProperty * Get mapOfMapProperty
* @return mapOfMapProperty * @return mapOfMapProperty
**/ **/
@JsonProperty("map_of_map_property")
public Map<String, Map<String, String>> getMapOfMapProperty() { public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty; return mapOfMapProperty;
} }

View File

@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Animal { public class Animal {
@ -24,6 +25,7 @@ public class Animal {
* Get className * Get className
* @return className * @return className
**/ **/
@JsonProperty("className")
@NotNull @NotNull
public String getClassName() { public String getClassName() {
return className; return className;
@ -42,6 +44,7 @@ public class Animal {
* Get color * Get color
* @return color * @return color
**/ **/
@JsonProperty("color")
public String getColor() { public String getColor() {
return color; return color;
} }

View File

@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class AnimalFarm extends ArrayList<Animal> { public class AnimalFarm extends ArrayList<Animal> {

View File

@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ArrayOfArrayOfNumberOnly { public class ArrayOfArrayOfNumberOnly {
@ -23,6 +24,7 @@ public class ArrayOfArrayOfNumberOnly {
* Get arrayArrayNumber * Get arrayArrayNumber
* @return arrayArrayNumber * @return arrayArrayNumber
**/ **/
@JsonProperty("ArrayArrayNumber")
public List<List<BigDecimal>> getArrayArrayNumber() { public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber; return arrayArrayNumber;
} }

View File

@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ArrayOfNumberOnly { public class ArrayOfNumberOnly {
@ -23,6 +24,7 @@ public class ArrayOfNumberOnly {
* Get arrayNumber * Get arrayNumber
* @return arrayNumber * @return arrayNumber
**/ **/
@JsonProperty("ArrayNumber")
public List<BigDecimal> getArrayNumber() { public List<BigDecimal> getArrayNumber() {
return arrayNumber; return arrayNumber;
} }

View File

@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ArrayTest { public class ArrayTest {
@ -27,6 +28,7 @@ public class ArrayTest {
* Get arrayOfString * Get arrayOfString
* @return arrayOfString * @return arrayOfString
**/ **/
@JsonProperty("array_of_string")
public List<String> getArrayOfString() { public List<String> getArrayOfString() {
return arrayOfString; return arrayOfString;
} }
@ -49,6 +51,7 @@ public class ArrayTest {
* Get arrayArrayOfInteger * Get arrayArrayOfInteger
* @return arrayArrayOfInteger * @return arrayArrayOfInteger
**/ **/
@JsonProperty("array_array_of_integer")
public List<List<Long>> getArrayArrayOfInteger() { public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger; return arrayArrayOfInteger;
} }
@ -71,6 +74,7 @@ public class ArrayTest {
* Get arrayArrayOfModel * Get arrayArrayOfModel
* @return arrayArrayOfModel * @return arrayArrayOfModel
**/ **/
@JsonProperty("array_array_of_model")
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() { public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel; return arrayArrayOfModel;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Capitalization { public class Capitalization {
@ -30,6 +31,7 @@ public class Capitalization {
* Get smallCamel * Get smallCamel
* @return smallCamel * @return smallCamel
**/ **/
@JsonProperty("smallCamel")
public String getSmallCamel() { public String getSmallCamel() {
return smallCamel; return smallCamel;
} }
@ -47,6 +49,7 @@ public class Capitalization {
* Get capitalCamel * Get capitalCamel
* @return capitalCamel * @return capitalCamel
**/ **/
@JsonProperty("CapitalCamel")
public String getCapitalCamel() { public String getCapitalCamel() {
return capitalCamel; return capitalCamel;
} }
@ -64,6 +67,7 @@ public class Capitalization {
* Get smallSnake * Get smallSnake
* @return smallSnake * @return smallSnake
**/ **/
@JsonProperty("small_Snake")
public String getSmallSnake() { public String getSmallSnake() {
return smallSnake; return smallSnake;
} }
@ -81,6 +85,7 @@ public class Capitalization {
* Get capitalSnake * Get capitalSnake
* @return capitalSnake * @return capitalSnake
**/ **/
@JsonProperty("Capital_Snake")
public String getCapitalSnake() { public String getCapitalSnake() {
return capitalSnake; return capitalSnake;
} }
@ -98,6 +103,7 @@ public class Capitalization {
* Get scAETHFlowPoints * Get scAETHFlowPoints
* @return scAETHFlowPoints * @return scAETHFlowPoints
**/ **/
@JsonProperty("SCA_ETH_Flow_Points")
public String getScAETHFlowPoints() { public String getScAETHFlowPoints() {
return scAETHFlowPoints; return scAETHFlowPoints;
} }
@ -115,6 +121,7 @@ public class Capitalization {
* Name of the pet * Name of the pet
* @return ATT_NAME * @return ATT_NAME
**/ **/
@JsonProperty("ATT_NAME")
public String getATTNAME() { public String getATTNAME() {
return ATT_NAME; return ATT_NAME;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Cat extends Animal { public class Cat extends Animal {
@ -21,6 +22,7 @@ public class Cat extends Animal {
* Get declawed * Get declawed
* @return declawed * @return declawed
**/ **/
@JsonProperty("declawed")
public Boolean isDeclawed() { public Boolean isDeclawed() {
return declawed; return declawed;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Category { public class Category {
@ -22,6 +23,7 @@ public class Category {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -39,6 +41,7 @@ public class Category {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Model for testing model with \"_class\" property") @ApiModel(description="Model for testing model with \"_class\" property")
public class ClassModel { public class ClassModel {
@ -22,6 +23,7 @@ public class ClassModel {
* Get propertyClass * Get propertyClass
* @return propertyClass * @return propertyClass
**/ **/
@JsonProperty("_class")
public String getPropertyClass() { public String getPropertyClass() {
return propertyClass; return propertyClass;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Client { public class Client {
@ -20,6 +21,7 @@ public class Client {
* Get client * Get client
* @return client * @return client
**/ **/
@JsonProperty("client")
public String getClient() { public String getClient() {
return client; return client;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Dog extends Animal { public class Dog extends Animal {
@ -21,6 +22,7 @@ public class Dog extends Animal {
* Get breed * Get breed
* @return breed * @return breed
**/ **/
@JsonProperty("breed")
public String getBreed() { public String getBreed() {
return breed; return breed;
} }

View File

@ -12,6 +12,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class EnumArrays { public class EnumArrays {
@ -90,6 +91,7 @@ public enum ArrayEnumEnum {
* Get justSymbol * Get justSymbol
* @return justSymbol * @return justSymbol
**/ **/
@JsonProperty("just_symbol")
public JustSymbolEnum getJustSymbol() { public JustSymbolEnum getJustSymbol() {
return justSymbol; return justSymbol;
} }
@ -107,6 +109,7 @@ public enum ArrayEnumEnum {
* Get arrayEnum * Get arrayEnum
* @return arrayEnum * @return arrayEnum
**/ **/
@JsonProperty("array_enum")
public List<ArrayEnumEnum> getArrayEnum() { public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum; return arrayEnum;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class EnumTest { public class EnumTest {
@ -126,6 +127,7 @@ public enum EnumNumberEnum {
* Get enumString * Get enumString
* @return enumString * @return enumString
**/ **/
@JsonProperty("enum_string")
public EnumStringEnum getEnumString() { public EnumStringEnum getEnumString() {
return enumString; return enumString;
} }
@ -143,6 +145,7 @@ public enum EnumNumberEnum {
* Get enumInteger * Get enumInteger
* @return enumInteger * @return enumInteger
**/ **/
@JsonProperty("enum_integer")
public EnumIntegerEnum getEnumInteger() { public EnumIntegerEnum getEnumInteger() {
return enumInteger; return enumInteger;
} }
@ -160,6 +163,7 @@ public enum EnumNumberEnum {
* Get enumNumber * Get enumNumber
* @return enumNumber * @return enumNumber
**/ **/
@JsonProperty("enum_number")
public EnumNumberEnum getEnumNumber() { public EnumNumberEnum getEnumNumber() {
return enumNumber; return enumNumber;
} }
@ -177,6 +181,7 @@ public enum EnumNumberEnum {
* Get outerEnum * Get outerEnum
* @return outerEnum * @return outerEnum
**/ **/
@JsonProperty("outerEnum")
public OuterEnum getOuterEnum() { public OuterEnum getOuterEnum() {
return outerEnum; return outerEnum;
} }

View File

@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class FormatTest { public class FormatTest {
@ -50,6 +51,7 @@ public class FormatTest {
* maximum: 100 * maximum: 100
* @return integer * @return integer
**/ **/
@JsonProperty("integer")
@Min(10) @Max(100) public Integer getInteger() { @Min(10) @Max(100) public Integer getInteger() {
return integer; return integer;
} }
@ -69,6 +71,7 @@ public class FormatTest {
* maximum: 200 * maximum: 200
* @return int32 * @return int32
**/ **/
@JsonProperty("int32")
@Min(20) @Max(200) public Integer getInt32() { @Min(20) @Max(200) public Integer getInt32() {
return int32; return int32;
} }
@ -86,6 +89,7 @@ public class FormatTest {
* Get int64 * Get int64
* @return int64 * @return int64
**/ **/
@JsonProperty("int64")
public Long getInt64() { public Long getInt64() {
return int64; return int64;
} }
@ -105,6 +109,7 @@ public class FormatTest {
* maximum: 543.2 * maximum: 543.2
* @return number * @return number
**/ **/
@JsonProperty("number")
@NotNull @NotNull
@DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() { @DecimalMin("32.1") @DecimalMax("543.2") public BigDecimal getNumber() {
return number; return number;
@ -125,6 +130,7 @@ public class FormatTest {
* maximum: 987.6 * maximum: 987.6
* @return _float * @return _float
**/ **/
@JsonProperty("float")
@DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() { @DecimalMin("54.3") @DecimalMax("987.6") public Float getFloat() {
return _float; return _float;
} }
@ -144,6 +150,7 @@ public class FormatTest {
* maximum: 123.4 * maximum: 123.4
* @return _double * @return _double
**/ **/
@JsonProperty("double")
@DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() { @DecimalMin("67.8") @DecimalMax("123.4") public Double getDouble() {
return _double; return _double;
} }
@ -161,6 +168,7 @@ public class FormatTest {
* Get string * Get string
* @return string * @return string
**/ **/
@JsonProperty("string")
@Pattern(regexp="/[a-z]/i") public String getString() { @Pattern(regexp="/[a-z]/i") public String getString() {
return string; return string;
} }
@ -178,6 +186,7 @@ public class FormatTest {
* Get _byte * Get _byte
* @return _byte * @return _byte
**/ **/
@JsonProperty("byte")
@NotNull @NotNull
@Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() { @Pattern(regexp="^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$") public byte[] getByte() {
return _byte; return _byte;
@ -196,6 +205,7 @@ public class FormatTest {
* Get binary * Get binary
* @return binary * @return binary
**/ **/
@JsonProperty("binary")
public byte[] getBinary() { public byte[] getBinary() {
return binary; return binary;
} }
@ -213,6 +223,7 @@ public class FormatTest {
* Get date * Get date
* @return date * @return date
**/ **/
@JsonProperty("date")
@NotNull @NotNull
public LocalDate getDate() { public LocalDate getDate() {
return date; return date;
@ -231,6 +242,7 @@ public class FormatTest {
* Get dateTime * Get dateTime
* @return dateTime * @return dateTime
**/ **/
@JsonProperty("dateTime")
public Date getDateTime() { public Date getDateTime() {
return dateTime; return dateTime;
} }
@ -248,6 +260,7 @@ public class FormatTest {
* Get uuid * Get uuid
* @return uuid * @return uuid
**/ **/
@JsonProperty("uuid")
public UUID getUuid() { public UUID getUuid() {
return uuid; return uuid;
} }
@ -265,6 +278,7 @@ public class FormatTest {
* Get password * Get password
* @return password * @return password
**/ **/
@JsonProperty("password")
@NotNull @NotNull
@Size(min=10,max=64) public String getPassword() { @Size(min=10,max=64) public String getPassword() {
return password; return password;

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class HasOnlyReadOnly { public class HasOnlyReadOnly {
@ -22,6 +23,7 @@ public class HasOnlyReadOnly {
* Get bar * Get bar
* @return bar * @return bar
**/ **/
@JsonProperty("bar")
public String getBar() { public String getBar() {
return bar; return bar;
} }
@ -31,6 +33,7 @@ public class HasOnlyReadOnly {
* Get foo * Get foo
* @return foo * @return foo
**/ **/
@JsonProperty("foo")
public String getFoo() { public String getFoo() {
return foo; return foo;
} }

View File

@ -13,6 +13,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class MapTest { public class MapTest {
@ -58,6 +59,7 @@ public enum InnerEnum {
* Get mapMapOfString * Get mapMapOfString
* @return mapMapOfString * @return mapMapOfString
**/ **/
@JsonProperty("map_map_of_string")
public Map<String, Map<String, String>> getMapMapOfString() { public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString; return mapMapOfString;
} }
@ -80,6 +82,7 @@ public enum InnerEnum {
* Get mapOfEnumString * Get mapOfEnumString
* @return mapOfEnumString * @return mapOfEnumString
**/ **/
@JsonProperty("map_of_enum_string")
public Map<String, InnerEnum> getMapOfEnumString() { public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString; return mapOfEnumString;
} }

View File

@ -16,6 +16,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class MixedPropertiesAndAdditionalPropertiesClass { public class MixedPropertiesAndAdditionalPropertiesClass {
@ -30,6 +31,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get uuid * Get uuid
* @return uuid * @return uuid
**/ **/
@JsonProperty("uuid")
public UUID getUuid() { public UUID getUuid() {
return uuid; return uuid;
} }
@ -47,6 +49,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get dateTime * Get dateTime
* @return dateTime * @return dateTime
**/ **/
@JsonProperty("dateTime")
public Date getDateTime() { public Date getDateTime() {
return dateTime; return dateTime;
} }
@ -64,6 +67,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
* Get map * Get map
* @return map * @return map
**/ **/
@JsonProperty("map")
public Map<String, Animal> getMap() { public Map<String, Animal> getMap() {
return map; return map;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Model for testing model name starting with number") @ApiModel(description="Model for testing model name starting with number")
public class Model200Response { public class Model200Response {
@ -24,6 +25,7 @@ public class Model200Response {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public Integer getName() { public Integer getName() {
return name; return name;
} }
@ -41,6 +43,7 @@ public class Model200Response {
* Get propertyClass * Get propertyClass
* @return propertyClass * @return propertyClass
**/ **/
@JsonProperty("class")
public String getPropertyClass() { public String getPropertyClass() {
return propertyClass; return propertyClass;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ModelApiResponse { public class ModelApiResponse {
@ -24,6 +25,7 @@ public class ModelApiResponse {
* Get code * Get code
* @return code * @return code
**/ **/
@JsonProperty("code")
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
@ -41,6 +43,7 @@ public class ModelApiResponse {
* Get type * Get type
* @return type * @return type
**/ **/
@JsonProperty("type")
public String getType() { public String getType() {
return type; return type;
} }
@ -58,6 +61,7 @@ public class ModelApiResponse {
* Get message * Get message
* @return message * @return message
**/ **/
@JsonProperty("message")
public String getMessage() { public String getMessage() {
return message; return message;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Model for testing reserved words") @ApiModel(description="Model for testing reserved words")
public class ModelReturn { public class ModelReturn {
@ -22,6 +23,7 @@ public class ModelReturn {
* Get _return * Get _return
* @return _return * @return _return
**/ **/
@JsonProperty("return")
public Integer getReturn() { public Integer getReturn() {
return _return; return _return;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
@ApiModel(description="Model for testing model name same as property name") @ApiModel(description="Model for testing model name same as property name")
public class Name { public class Name {
@ -28,6 +29,7 @@ public class Name {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
@NotNull @NotNull
public Integer getName() { public Integer getName() {
return name; return name;
@ -46,6 +48,7 @@ public class Name {
* Get snakeCase * Get snakeCase
* @return snakeCase * @return snakeCase
**/ **/
@JsonProperty("snake_case")
public Integer getSnakeCase() { public Integer getSnakeCase() {
return snakeCase; return snakeCase;
} }
@ -55,6 +58,7 @@ public class Name {
* Get property * Get property
* @return property * @return property
**/ **/
@JsonProperty("property")
public String getProperty() { public String getProperty() {
return property; return property;
} }
@ -72,6 +76,7 @@ public class Name {
* Get _123Number * Get _123Number
* @return _123Number * @return _123Number
**/ **/
@JsonProperty("123Number")
public Integer get123Number() { public Integer get123Number() {
return _123Number; return _123Number;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class NumberOnly { public class NumberOnly {
@ -21,6 +22,7 @@ public class NumberOnly {
* Get justNumber * Get justNumber
* @return justNumber * @return justNumber
**/ **/
@JsonProperty("JustNumber")
public BigDecimal getJustNumber() { public BigDecimal getJustNumber() {
return justNumber; return justNumber;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Order { public class Order {
@ -64,6 +65,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -81,6 +83,7 @@ public enum StatusEnum {
* Get petId * Get petId
* @return petId * @return petId
**/ **/
@JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
return petId; return petId;
} }
@ -98,6 +101,7 @@ public enum StatusEnum {
* Get quantity * Get quantity
* @return quantity * @return quantity
**/ **/
@JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
return quantity; return quantity;
} }
@ -115,6 +119,7 @@ public enum StatusEnum {
* Get shipDate * Get shipDate
* @return shipDate * @return shipDate
**/ **/
@JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
return shipDate; return shipDate;
} }
@ -132,6 +137,7 @@ public enum StatusEnum {
* Order Status * Order Status
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }
@ -149,6 +155,7 @@ public enum StatusEnum {
* Get complete * Get complete
* @return complete * @return complete
**/ **/
@JsonProperty("complete")
public Boolean isComplete() { public Boolean isComplete() {
return complete; return complete;
} }

View File

@ -11,6 +11,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class OuterComposite { public class OuterComposite {
@ -25,6 +26,7 @@ public class OuterComposite {
* Get myNumber * Get myNumber
* @return myNumber * @return myNumber
**/ **/
@JsonProperty("my_number")
public BigDecimal getMyNumber() { public BigDecimal getMyNumber() {
return myNumber; return myNumber;
} }
@ -42,6 +44,7 @@ public class OuterComposite {
* Get myString * Get myString
* @return myString * @return myString
**/ **/
@JsonProperty("my_string")
public String getMyString() { public String getMyString() {
return myString; return myString;
} }
@ -59,6 +62,7 @@ public class OuterComposite {
* Get myBoolean * Get myBoolean
* @return myBoolean * @return myBoolean
**/ **/
@JsonProperty("my_boolean")
public Boolean getMyBoolean() { public Boolean getMyBoolean() {
return myBoolean; return myBoolean;
} }

View File

@ -14,6 +14,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Pet { public class Pet {
@ -67,6 +68,7 @@ public enum StatusEnum {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -84,6 +86,7 @@ public enum StatusEnum {
* Get category * Get category
* @return category * @return category
**/ **/
@JsonProperty("category")
public Category getCategory() { public Category getCategory() {
return category; return category;
} }
@ -101,6 +104,7 @@ public enum StatusEnum {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
@NotNull @NotNull
public String getName() { public String getName() {
return name; return name;
@ -119,6 +123,7 @@ public enum StatusEnum {
* Get photoUrls * Get photoUrls
* @return photoUrls * @return photoUrls
**/ **/
@JsonProperty("photoUrls")
@NotNull @NotNull
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
return photoUrls; return photoUrls;
@ -142,6 +147,7 @@ public enum StatusEnum {
* Get tags * Get tags
* @return tags * @return tags
**/ **/
@JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
return tags; return tags;
} }
@ -164,6 +170,7 @@ public enum StatusEnum {
* pet status in the store * pet status in the store
* @return status * @return status
**/ **/
@JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
return status; return status;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class ReadOnlyFirst { public class ReadOnlyFirst {
@ -22,6 +23,7 @@ public class ReadOnlyFirst {
* Get bar * Get bar
* @return bar * @return bar
**/ **/
@JsonProperty("bar")
public String getBar() { public String getBar() {
return bar; return bar;
} }
@ -31,6 +33,7 @@ public class ReadOnlyFirst {
* Get baz * Get baz
* @return baz * @return baz
**/ **/
@JsonProperty("baz")
public String getBaz() { public String getBaz() {
return baz; return baz;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class SpecialModelName { public class SpecialModelName {
@ -20,6 +21,7 @@ public class SpecialModelName {
* Get specialPropertyName * Get specialPropertyName
* @return specialPropertyName * @return specialPropertyName
**/ **/
@JsonProperty("$special[property.name]")
public Long getSpecialPropertyName() { public Long getSpecialPropertyName() {
return specialPropertyName; return specialPropertyName;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Tag { public class Tag {
@ -22,6 +23,7 @@ public class Tag {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -39,6 +41,7 @@ public class Tag {
* Get name * Get name
* @return name * @return name
**/ **/
@JsonProperty("name")
public String getName() { public String getName() {
return name; return name;
} }

View File

@ -10,6 +10,7 @@ import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlEnumValue;
import com.fasterxml.jackson.annotation.JsonProperty;
public class User { public class User {
@ -34,6 +35,7 @@ public class User {
* Get id * Get id
* @return id * @return id
**/ **/
@JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
@ -51,6 +53,7 @@ public class User {
* Get username * Get username
* @return username * @return username
**/ **/
@JsonProperty("username")
public String getUsername() { public String getUsername() {
return username; return username;
} }
@ -68,6 +71,7 @@ public class User {
* Get firstName * Get firstName
* @return firstName * @return firstName
**/ **/
@JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
return firstName; return firstName;
} }
@ -85,6 +89,7 @@ public class User {
* Get lastName * Get lastName
* @return lastName * @return lastName
**/ **/
@JsonProperty("lastName")
public String getLastName() { public String getLastName() {
return lastName; return lastName;
} }
@ -102,6 +107,7 @@ public class User {
* Get email * Get email
* @return email * @return email
**/ **/
@JsonProperty("email")
public String getEmail() { public String getEmail() {
return email; return email;
} }
@ -119,6 +125,7 @@ public class User {
* Get password * Get password
* @return password * @return password
**/ **/
@JsonProperty("password")
public String getPassword() { public String getPassword() {
return password; return password;
} }
@ -136,6 +143,7 @@ public class User {
* Get phone * Get phone
* @return phone * @return phone
**/ **/
@JsonProperty("phone")
public String getPhone() { public String getPhone() {
return phone; return phone;
} }
@ -153,6 +161,7 @@ public class User {
* User Status * User Status
* @return userStatus * @return userStatus
**/ **/
@JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {
return userStatus; return userStatus;
} }