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

@ -4,4 +4,4 @@
{{#allowableValues}}{{#enumVars}}
* `{{name}}` (value: `{{value}}`)
{{#enumVars}}{{/allowableValues}}
{{/enumVars}}{{/allowableValues}}

View File

@ -11,11 +11,11 @@ Name | Type | Description | Notes
**_float** | **Float** | | [optional]
**_double** | **Double** | | [optional]
**string** | **String** | | [optional]
**_byte** | **byte[]** | | [optional]
**_byte** | **byte[]** | |
**binary** | **byte[]** | | [optional]
**date** | [**Date**](Date.md) | | [optional]
**date** | [**Date**](Date.md) | |
**dateTime** | [**Date**](Date.md) | | [optional]
**password** | **String** | | [optional]
**password** | **String** | |

View File

@ -16,9 +16,9 @@ Name | Type | Description | Notes
## Enum: StatusEnum
Name | Value
---- | -----
PLACED | placed
APPROVED | approved
DELIVERED | delivered
PLACED | "placed"
APPROVED | "approved"
DELIVERED | "delivered"

View File

@ -16,9 +16,9 @@ Name | Type | Description | Notes
## Enum: StatusEnum
Name | Value
---- | -----
AVAILABLE | available
PENDING | pending
SOLD | sold
AVAILABLE | "available"
PENDING | "pending"
SOLD | "sold"

View File

@ -8,17 +8,17 @@ git_repo_id=$2
release_note=$3
if [ "$git_user_id" = "" ]; then
git_user_id=""
git_user_id="YOUR_GIT_USR_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id=""
git_repo_id="YOUR_GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note=""
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi

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) {

View File

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

View File

@ -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;
}

View File

@ -27,14 +27,14 @@ public class Order {
public enum StatusEnum {
@SerializedName("placed")
PLACED("placed"),
@SerializedName(""placed"")
PLACED(""placed""),
@SerializedName("approved")
APPROVED("approved"),
@SerializedName(""approved"")
APPROVED(""approved""),
@SerializedName("delivered")
DELIVERED("delivered");
@SerializedName(""delivered"")
DELIVERED(""delivered"");
private String value;

View File

@ -3,6 +3,7 @@ package io.swagger.client.model;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Category;
import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
@ -10,82 +11,55 @@ import java.util.List;
import com.google.gson.annotations.SerializedName;
/**
* InlineResponse200
*/
public class InlineResponse200 {
@SerializedName("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@SerializedName("name")
private String name = null;
public class Pet {
@SerializedName("id")
private Long id = null;
@SerializedName("category")
private Object category = null;
private Category category = null;
@SerializedName("name")
private String name = null;
@SerializedName("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@SerializedName("tags")
private List<Tag> tags = new ArrayList<Tag>();
/**
* pet status in the store
*/
public enum StatusEnum {
@SerializedName("available")
AVAILABLE("available"),
@SerializedName("pending")
PENDING("pending"),
public enum StatusEnum {
@SerializedName(""available"")
AVAILABLE(""available""),
@SerializedName("sold")
SOLD("sold");
@SerializedName(""pending"")
PENDING(""pending""),
private String value;
@SerializedName(""sold"")
SOLD(""sold"");
StatusEnum(String value) {
this.value = value;
}
private String value;
@Override
public String toString() {
return String.valueOf(value);
}
StatusEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return value;
}
}
@SerializedName("status")
private StatusEnum status = null;
/**
**/
@ApiModelProperty(value = "")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
/**
**/
@ApiModelProperty(value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
@ApiModelProperty(required = true, value = "")
public Long getId() {
return id;
}
@ -93,18 +67,36 @@ public class InlineResponse200 {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
public Object getCategory() {
public Category getCategory() {
return category;
}
public void setCategory(Object category) {
public void setCategory(Category category) {
this.category = category;
}
/**
**/
@ApiModelProperty(required = true, value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
@ApiModelProperty(required = true, value = "")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
/**
**/
@ApiModelProperty(value = "")
@ -115,7 +107,6 @@ public class InlineResponse200 {
this.tags = tags;
}
/**
* pet status in the store
**/
@ -127,7 +118,6 @@ public class InlineResponse200 {
this.status = status;
}
@Override
public boolean equals(Object o) {
@ -137,29 +127,29 @@ public class InlineResponse200 {
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) &&
Objects.equals(this.name, inlineResponse200.name) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.status, inlineResponse200.status);
Pet pet = (Pet) o;
return Objects.equals(id, pet.id) &&
Objects.equals(category, pet.category) &&
Objects.equals(name, pet.name) &&
Objects.equals(photoUrls, pet.photoUrls) &&
Objects.equals(tags, pet.tags) &&
Objects.equals(status, pet.status);
}
@Override
public int hashCode() {
return Objects.hash(photoUrls, name, id, category, tags, status);
return Objects.hash(id, category, name, photoUrls, tags, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
sb.append("class Pet {\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}");
@ -177,4 +167,3 @@ public class InlineResponse200 {
return o.toString().replace("\n", "\n ");
}
}

View File

@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-27T10:03:24.454+02:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-28T00:22:56.942+08:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@ -27,14 +27,14 @@ public class Order {
public enum StatusEnum {
@SerializedName("placed")
PLACED("placed"),
@SerializedName(""placed"")
PLACED(""placed""),
@SerializedName("approved")
APPROVED("approved"),
@SerializedName(""approved"")
APPROVED(""approved""),
@SerializedName("delivered")
DELIVERED("delivered");
@SerializedName(""delivered"")
DELIVERED(""delivered"");
private String value;

View File

@ -33,14 +33,14 @@ public class Pet {
public enum StatusEnum {
@SerializedName("available")
AVAILABLE("available"),
@SerializedName(""available"")
AVAILABLE(""available""),
@SerializedName("pending")
PENDING("pending"),
@SerializedName(""pending"")
PENDING(""pending""),
@SerializedName("sold")
SOLD("sold");
@SerializedName(""sold"")
SOLD(""sold"");
private String value;