fix java okhttp enum mismatche tab

This commit is contained in:
wing328
2016-04-28 15:57:49 +08:00
parent 70b25a682d
commit 3913388331
28 changed files with 175 additions and 180 deletions

View File

@@ -3,7 +3,7 @@ package io.swagger.client;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:54:48.271+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T15:54:58.477+08:00")
public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:54:48.271+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T15:54:58.477+08:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:54:48.271+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T15:54:58.477+08:00")
public class Pair {
private String name = "";
private String value = "";

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:54:48.271+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T15:54:58.477+08:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:54:48.271+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T15:54:58.477+08:00")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;

View File

@@ -5,7 +5,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-23T12:54:48.271+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T15:54:58.477+08:00")
public class OAuth implements Authentication {
private String accessToken;

View File

@@ -14,9 +14,7 @@ public class Animal {
@SerializedName("className")
private String className = null;
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -27,7 +25,6 @@ public class Animal {
this.className = className;
}
@Override
public boolean equals(Object o) {

View File

@@ -15,12 +15,10 @@ public class Cat extends Animal {
@SerializedName("className")
private String className = null;
@SerializedName("declawed")
private Boolean declawed = null;
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -31,7 +29,6 @@ public class Cat extends Animal {
this.className = className;
}
/**
**/
@ApiModelProperty(value = "")
@@ -42,7 +39,6 @@ public class Cat extends Animal {
this.declawed = declawed;
}
@Override
public boolean equals(Object o) {

View File

@@ -15,12 +15,10 @@ public class Dog extends Animal {
@SerializedName("className")
private String className = null;
@SerializedName("breed")
private String breed = null;
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -31,7 +29,6 @@ public class Dog extends Animal {
this.className = className;
}
/**
**/
@ApiModelProperty(value = "")
@@ -42,7 +39,6 @@ public class Dog extends Animal {
this.breed = breed;
}
@Override
public boolean equals(Object o) {

View File

@@ -37,7 +37,7 @@ public class EnumTest {
@SerializedName("enum_string")
private EnumStringEnum enumString = null;
/**
* Gets or Sets enumInteger
@@ -63,7 +63,7 @@ public class EnumTest {
@SerializedName("enum_integer")
private EnumIntegerEnum enumInteger = null;
/**
* Gets or Sets enumNumber
@@ -89,9 +89,7 @@ public class EnumTest {
@SerializedName("enum_number")
private EnumNumberEnum enumNumber = null;
/**
**/
@ApiModelProperty(value = "")
@@ -102,7 +100,6 @@ public class EnumTest {
this.enumString = enumString;
}
/**
**/
@ApiModelProperty(value = "")
@@ -113,7 +110,6 @@ public class EnumTest {
this.enumInteger = enumInteger;
}
/**
**/
@ApiModelProperty(value = "")
@@ -124,7 +120,6 @@ public class EnumTest {
this.enumNumber = enumNumber;
}
@Override
public boolean equals(Object o) {

View File

@@ -9,9 +9,9 @@ import java.util.Date;
import com.google.gson.annotations.SerializedName;
/**
* FormatTest
*/
public class FormatTest {
@SerializedName("integer")
@@ -51,6 +51,8 @@ public class FormatTest {
private String password = null;
/**
* minimum: 10.0
* maximum: 100.0
**/
@ApiModelProperty(value = "")
public Integer getInteger() {
@@ -61,6 +63,8 @@ public class FormatTest {
}
/**
* minimum: 20.0
* maximum: 200.0
**/
@ApiModelProperty(value = "")
public Integer getInt32() {
@@ -81,6 +85,8 @@ public class FormatTest {
}
/**
* minimum: 32.1
* maximum: 543.2
**/
@ApiModelProperty(required = true, value = "")
public BigDecimal getNumber() {
@@ -91,6 +97,8 @@ public class FormatTest {
}
/**
* minimum: 54.3
* maximum: 987.6
**/
@ApiModelProperty(value = "")
public Float getFloat() {
@@ -101,6 +109,8 @@ public class FormatTest {
}
/**
* minimum: 67.8
* maximum: 123.4
**/
@ApiModelProperty(value = "")
public Double getDouble() {
@@ -122,7 +132,7 @@ public class FormatTest {
/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public byte[] getByte() {
return _byte;
}
@@ -142,7 +152,7 @@ public class FormatTest {
/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public Date getDate() {
return date;
}
@@ -162,7 +172,7 @@ public class FormatTest {
/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public String getPassword() {
return password;
}
@@ -231,3 +241,4 @@ public class FormatTest {
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -8,15 +8,14 @@ import com.google.gson.annotations.SerializedName;
/**
* Model200Response
* Model for testing model name starting with number
*/
@ApiModel(description = "Model for testing model name starting with number")
public class Model200Response {
@SerializedName("name")
private Integer name = null;
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +26,6 @@ public class Model200Response {
this.name = name;
}
@Override
public boolean equals(Object o) {

View File

@@ -7,9 +7,9 @@ import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
/**
* ModelApiResponse
*/
public class ModelApiResponse {
@SerializedName("code")
@@ -94,3 +94,4 @@ public class ModelApiResponse {
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -8,15 +8,14 @@ import com.google.gson.annotations.SerializedName;
/**
* ModelReturn
* Model for testing reserved words
*/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +26,6 @@ public class ModelReturn {
this._return = _return;
}
@Override
public boolean equals(Object o) {

View File

@@ -8,21 +8,23 @@ import com.google.gson.annotations.SerializedName;
/**
* Name
* Model for testing model name same as property name
*/
@ApiModel(description = "Model for testing model name same as property name")
public class Name {
@SerializedName("name")
private Integer name = null;
@SerializedName("snake_case")
private Integer snakeCase = null;
@SerializedName("property")
private String property = null;
/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
@@ -30,18 +32,23 @@ public class Name {
this.name = name;
}
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
/**
**/
@ApiModelProperty(value = "")
public String getProperty() {
return property;
}
public void setProperty(String property) {
this.property = property;
}
@Override
public boolean equals(Object o) {
@@ -53,12 +60,13 @@ public class Name {
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase);
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property);
}
@Override
public int hashCode() {
return Objects.hash(name, snakeCase);
return Objects.hash(name, snakeCase, property);
}
@Override
@@ -68,6 +76,7 @@ public class Name {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append("}");
return sb.toString();
}

View File

@@ -15,16 +15,16 @@ public class Order {
@SerializedName("id")
private Long id = null;
@SerializedName("petId")
private Long petId = null;
@SerializedName("quantity")
private Integer quantity = null;
@SerializedName("shipDate")
private Date shipDate = null;
/**
* Order Status
@@ -52,21 +52,21 @@ public class Order {
}
@SerializedName("status")
private StatusEnum status = StatusEnum.PLACED;
@SerializedName("complete")
private Boolean complete = null;
private StatusEnum status = null;
@SerializedName("complete")
private Boolean complete = false;
/**
**/
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@@ -77,7 +77,6 @@ public class Order {
this.petId = petId;
}
/**
**/
@ApiModelProperty(value = "")
@@ -88,7 +87,6 @@ public class Order {
this.quantity = quantity;
}
/**
**/
@ApiModelProperty(value = "")
@@ -99,7 +97,6 @@ public class Order {
this.shipDate = shipDate;
}
/**
* Order Status
**/
@@ -111,7 +108,6 @@ public class Order {
this.status = status;
}
/**
**/
@ApiModelProperty(value = "")
@@ -122,7 +118,6 @@ public class Order {
this.complete = complete;
}
@Override
public boolean equals(Object o) {