fix java property with the name "class"

This commit is contained in:
wing328
2016-06-20 14:51:17 +08:00
parent 514255c8b7
commit 8283b701e8
45 changed files with 272 additions and 65 deletions

View File

@@ -173,8 +173,8 @@ public class ApiClient {
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();
authentications.put("petstore_auth", new OAuth());
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("petstore_auth", new OAuth());
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
}

View File

@@ -39,8 +39,8 @@ import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import org.joda.time.LocalDate;
import java.math.BigDecimal;
import org.joda.time.DateTime;
import java.math.BigDecimal;
import java.lang.reflect.Type;
import java.util.ArrayList;

View File

@@ -39,8 +39,8 @@ import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File;
import io.swagger.client.model.ModelApiResponse;
import java.lang.reflect.Type;
import java.util.ArrayList;

View File

@@ -39,6 +39,8 @@ import com.google.gson.annotations.SerializedName;
public class Model200Response {
@SerializedName("name")
private Integer name = null;
@SerializedName("class")
private String PropertyClass = null;
/**
* Get name
@@ -58,6 +60,24 @@ public class Model200Response {
this.name = name;
}
/**
* Get PropertyClass
* @return PropertyClass
**/
@ApiModelProperty(value = "")
public String getPropertyClass() {
return PropertyClass;
}
/**
* Set PropertyClass
*
* @param PropertyClass PropertyClass
*/
public void setPropertyClass(String PropertyClass) {
this.PropertyClass = PropertyClass;
}
@Override
public boolean equals(Object o) {
@@ -68,12 +88,13 @@ public class Model200Response {
return false;
}
Model200Response _200Response = (Model200Response) o;
return Objects.equals(this.name, _200Response.name);
return Objects.equals(this.name, _200Response.name) &&
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
}
@Override
public int hashCode() {
return Objects.hash(name);
return Objects.hash(name, PropertyClass);
}
@Override
@@ -82,6 +103,7 @@ public class Model200Response {
sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
sb.append("}");
return sb.toString();
}