Java: do not generate setter for readonly properties

This commit is contained in:
xhh 2016-02-22 15:44:32 +08:00
parent 0ba123d60f
commit b8beca7f24
18 changed files with 22 additions and 127 deletions

View File

@ -33,10 +33,10 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
@ApiModelProperty({{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @ApiModelProperty({{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
public {{{datatypeWithEnum}}} {{getter}}() { public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}}; return {{name}};
} }{{^isReadOnly}}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
this.{{name}} = {{name}}; this.{{name}} = {{name}};
} }{{/isReadOnly}}
{{/vars}} {{/vars}}

View File

@ -8,7 +8,7 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
{{>enumClass}}{{/items}}{{/items.isEnum}} {{>enumClass}}{{/items}}{{/items.isEnum}}
private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/vars}} private {{{datatypeWithEnum}}} {{name}} = {{{defaultValue}}};{{/vars}}
{{#vars}} {{#vars}}{{^isReadOnly}}
/**{{#description}} /**{{#description}}
* {{{description}}}{{/description}}{{#minimum}} * {{{description}}}{{/description}}{{#minimum}}
* minimum: {{minimum}}{{/minimum}}{{#maximum}} * minimum: {{minimum}}{{/minimum}}{{#maximum}}
@ -18,16 +18,16 @@ public class {{classname}} {{#parent}}extends {{{parent}}}{{/parent}} {{#seriali
this.{{name}} = {{name}}; this.{{name}} = {{name}};
return this; return this;
} }
{{/isReadOnly}}{{#vendorExtensions.extraAnnotation}}
{{#vendorExtensions.extraAnnotation}}{{vendorExtensions.extraAnnotation}}{{/vendorExtensions.extraAnnotation}} {{vendorExtensions.extraAnnotation}}{{/vendorExtensions.extraAnnotation}}
@ApiModelProperty({{#example}}example = "{{example}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}") @ApiModelProperty({{#example}}example = "{{example}}", {{/example}}{{#required}}required = {{required}}, {{/required}}value = "{{{description}}}")
@JsonProperty("{{baseName}}") @JsonProperty("{{baseName}}")
public {{{datatypeWithEnum}}} {{getter}}() { public {{{datatypeWithEnum}}} {{getter}}() {
return {{name}}; return {{name}};
} }{{^isReadOnly}}
public void {{setter}}({{{datatypeWithEnum}}} {{name}}) { public void {{setter}}({{{datatypeWithEnum}}} {{name}}) {
this.{{name}} = {{name}}; this.{{name}} = {{name}};
} }{{/isReadOnly}}
{{/vars}} {{/vars}}

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T14:59:49.052+08:00")
public class Category { public class Category {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class Category {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -41,7 +40,6 @@ public class Category {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T14:59:49.052+08:00")
public class Order { public class Order {
private Long id = null; private Long id = null;
@ -42,22 +42,11 @@ public class Order {
private Boolean complete = null; private Boolean complete = null;
/**
**/
public Order id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) {
this.id = id;
}
/** /**
@ -67,7 +56,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("petId") @JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
@ -85,7 +73,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("quantity") @JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
@ -103,7 +90,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("shipDate") @JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
@ -122,7 +108,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "Order Status") @ApiModelProperty(example = "null", value = "Order Status")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
@ -140,7 +125,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean getComplete() {

View File

@ -14,7 +14,7 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T14:59:49.052+08:00")
public class Pet { public class Pet {
private Long id = null; private Long id = null;
@ -52,7 +52,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -70,7 +69,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("category") @JsonProperty("category")
public Category getCategory() { public Category getCategory() {
@ -88,7 +86,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {
@ -106,7 +103,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
@ -124,7 +120,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("tags") @JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
@ -143,7 +138,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "pet status in the store") @ApiModelProperty(example = "null", value = "pet status in the store")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T14:59:49.052+08:00")
public class Tag { public class Tag {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class Tag {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -41,7 +40,6 @@ public class Tag {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:20.498+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T14:59:49.052+08:00")
public class User { public class User {
private Long id = null; private Long id = null;
@ -29,7 +29,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -47,7 +46,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("username") @JsonProperty("username")
public String getUsername() { public String getUsername() {
@ -65,7 +63,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("firstName") @JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
@ -83,7 +80,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("lastName") @JsonProperty("lastName")
public String getLastName() { public String getLastName() {
@ -101,7 +97,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("email") @JsonProperty("email")
public String getEmail() { public String getEmail() {
@ -119,7 +114,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("password") @JsonProperty("password")
public String getPassword() { public String getPassword() {
@ -137,7 +131,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("phone") @JsonProperty("phone")
public String getPhone() { public String getPhone() {
@ -156,7 +149,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "User Status") @ApiModelProperty(example = "null", value = "User Status")
@JsonProperty("userStatus") @JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:23.375+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:32:23.465+08:00")
public class Category { public class Category {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class Category {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -41,7 +40,6 @@ public class Category {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:23.375+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:32:23.465+08:00")
public class Order { public class Order {
private Long id = null; private Long id = null;
@ -42,22 +42,11 @@ public class Order {
private Boolean complete = null; private Boolean complete = null;
/**
**/
public Order id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) {
this.id = id;
}
/** /**
@ -67,7 +56,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("petId") @JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
@ -85,7 +73,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("quantity") @JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
@ -103,7 +90,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("shipDate") @JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
@ -122,7 +108,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "Order Status") @ApiModelProperty(example = "null", value = "Order Status")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
@ -140,7 +125,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean getComplete() {

View File

@ -14,7 +14,7 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:23.375+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:32:23.465+08:00")
public class Pet { public class Pet {
private Long id = null; private Long id = null;
@ -52,7 +52,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -70,7 +69,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("category") @JsonProperty("category")
public Category getCategory() { public Category getCategory() {
@ -88,7 +86,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {
@ -106,7 +103,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
@ -124,7 +120,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("tags") @JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
@ -143,7 +138,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "pet status in the store") @ApiModelProperty(example = "null", value = "pet status in the store")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:23.375+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:32:23.465+08:00")
public class Tag { public class Tag {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class Tag {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -41,7 +40,6 @@ public class Tag {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:23.375+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:32:23.465+08:00")
public class User { public class User {
private Long id = null; private Long id = null;
@ -29,7 +29,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -47,7 +46,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("username") @JsonProperty("username")
public String getUsername() { public String getUsername() {
@ -65,7 +63,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("firstName") @JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
@ -83,7 +80,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("lastName") @JsonProperty("lastName")
public String getLastName() { public String getLastName() {
@ -101,7 +97,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("email") @JsonProperty("email")
public String getEmail() { public String getEmail() {
@ -119,7 +114,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("password") @JsonProperty("password")
public String getPassword() { public String getPassword() {
@ -137,7 +131,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("phone") @JsonProperty("phone")
public String getPhone() { public String getPhone() {
@ -156,7 +149,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "User Status") @ApiModelProperty(example = "null", value = "User Status")
@JsonProperty("userStatus") @JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:34:25.436+08:00")
public class Category { public class Category {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class Category {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -41,7 +40,6 @@ public class Category {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -11,7 +11,7 @@ import java.util.Date;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:34:25.436+08:00")
public class Order { public class Order {
private Long id = null; private Long id = null;
@ -42,22 +42,11 @@ public class Order {
private Boolean complete = null; private Boolean complete = null;
/**
**/
public Order id(Long id) {
this.id = id;
return this;
}
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) {
this.id = id;
}
/** /**
@ -67,7 +56,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("petId") @JsonProperty("petId")
public Long getPetId() { public Long getPetId() {
@ -85,7 +73,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("quantity") @JsonProperty("quantity")
public Integer getQuantity() { public Integer getQuantity() {
@ -103,7 +90,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("shipDate") @JsonProperty("shipDate")
public Date getShipDate() { public Date getShipDate() {
@ -122,7 +108,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "Order Status") @ApiModelProperty(example = "null", value = "Order Status")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {
@ -140,7 +125,6 @@ public class Order {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("complete") @JsonProperty("complete")
public Boolean getComplete() { public Boolean getComplete() {

View File

@ -14,7 +14,7 @@ import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:34:25.436+08:00")
public class Pet { public class Pet {
private Long id = null; private Long id = null;
@ -52,7 +52,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -70,7 +69,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("category") @JsonProperty("category")
public Category getCategory() { public Category getCategory() {
@ -88,7 +86,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "doggie", required = true, value = "") @ApiModelProperty(example = "doggie", required = true, value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {
@ -106,7 +103,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", required = true, value = "") @ApiModelProperty(example = "null", required = true, value = "")
@JsonProperty("photoUrls") @JsonProperty("photoUrls")
public List<String> getPhotoUrls() { public List<String> getPhotoUrls() {
@ -124,7 +120,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("tags") @JsonProperty("tags")
public List<Tag> getTags() { public List<Tag> getTags() {
@ -143,7 +138,6 @@ public class Pet {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "pet status in the store") @ApiModelProperty(example = "null", value = "pet status in the store")
@JsonProperty("status") @JsonProperty("status")
public StatusEnum getStatus() { public StatusEnum getStatus() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:34:25.436+08:00")
public class Tag { public class Tag {
private Long id = null; private Long id = null;
@ -23,7 +23,6 @@ public class Tag {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -41,7 +40,6 @@ public class Tag {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("name") @JsonProperty("name")
public String getName() { public String getName() {

View File

@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-17T17:16:21.885+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-02-22T15:34:25.436+08:00")
public class User { public class User {
private Long id = null; private Long id = null;
@ -29,7 +29,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("id") @JsonProperty("id")
public Long getId() { public Long getId() {
@ -47,7 +46,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("username") @JsonProperty("username")
public String getUsername() { public String getUsername() {
@ -65,7 +63,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("firstName") @JsonProperty("firstName")
public String getFirstName() { public String getFirstName() {
@ -83,7 +80,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("lastName") @JsonProperty("lastName")
public String getLastName() { public String getLastName() {
@ -101,7 +97,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("email") @JsonProperty("email")
public String getEmail() { public String getEmail() {
@ -119,7 +114,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("password") @JsonProperty("password")
public String getPassword() { public String getPassword() {
@ -137,7 +131,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "") @ApiModelProperty(example = "null", value = "")
@JsonProperty("phone") @JsonProperty("phone")
public String getPhone() { public String getPhone() {
@ -156,7 +149,6 @@ public class User {
return this; return this;
} }
@ApiModelProperty(example = "null", value = "User Status") @ApiModelProperty(example = "null", value = "User Status")
@JsonProperty("userStatus") @JsonProperty("userStatus")
public Integer getUserStatus() { public Integer getUserStatus() {

View File

@ -62,9 +62,6 @@ public enum StatusEnum {
public Long getId() { public Long getId() {
return id; return id;
} }
public void setId(Long id) {
this.id = id;
}
/** /**