mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
Merge pull request #3393 from cbornet/java_inheritance
Set supportInheritance to true for java based gens
This commit is contained in:
commit
118fd4d84d
@ -43,6 +43,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
|
||||
public AbstractJavaCodegen() {
|
||||
super();
|
||||
supportsInheritance = true;
|
||||
modelTemplateFiles.put("model.mustache", ".java");
|
||||
apiTemplateFiles.put("api.mustache", ".java");
|
||||
apiTestTemplateFiles.put("api_test.mustache", ".java");
|
||||
|
@ -15,7 +15,6 @@ public class JavaCXFServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
public JavaCXFServerCodegen()
|
||||
{
|
||||
super();
|
||||
supportsInheritance = true;
|
||||
sourceFolder = "gen" + File.separator + "java";
|
||||
outputFolder = "generated-code/JavaJaxRS-CXF";
|
||||
apiTestTemplateFiles.clear(); // TODO: add test template
|
||||
|
@ -25,7 +25,6 @@ public class JavaJAXRSSpecServerCodegen extends AbstractJavaJAXRSServerCodegen
|
||||
public JavaJAXRSSpecServerCodegen()
|
||||
{
|
||||
super();
|
||||
supportsInheritance = true;
|
||||
sourceFolder = "src/main/java";
|
||||
invokerPackage = "io.swagger.api";
|
||||
artifactId = "swagger-jaxrs-server";
|
||||
|
@ -41,10 +41,10 @@ public class ApiClient {
|
||||
this();
|
||||
for(String authName : authNames) {
|
||||
RequestInterceptor auth;
|
||||
if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if (authName == "petstore_auth") {
|
||||
if (authName == "petstore_auth") {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
@ -4,8 +4,8 @@ import io.swagger.client.ApiClient;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -3,8 +3,8 @@ package io.swagger.client.api;
|
||||
import io.swagger.client.ApiClient;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -99,8 +99,8 @@ public class ApiClient {
|
||||
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
|
||||
|
@ -34,8 +34,8 @@ import io.swagger.client.Pair;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -33,8 +33,8 @@ import io.swagger.client.model.*;
|
||||
import io.swagger.client.Pair;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.8</swagger-core-version>
|
||||
<swagger-core-version>1.5.9</swagger-core-version>
|
||||
<jersey-version>2.22.2</jersey-version>
|
||||
<jackson-version>2.7.5</jackson-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
|
@ -84,8 +84,8 @@ public class ApiClient {
|
||||
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ import io.swagger.client.Pair;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import java.time.LocalDate;
|
||||
import java.time.OffsetDateTime;
|
||||
import java.time.LocalDate;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -8,8 +8,8 @@ import io.swagger.client.Pair;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -173,7 +173,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.8</swagger-core-version>
|
||||
<swagger-core-version>1.5.9</swagger-core-version>
|
||||
<jersey-version>2.22.2</jersey-version>
|
||||
<jackson-version>2.7.5</jackson-version>
|
||||
<jodatime-version>2.9.4</jodatime-version>
|
||||
|
@ -84,8 +84,8 @@ public class ApiClient {
|
||||
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
}
|
||||
|
@ -9,8 +9,8 @@ import javax.ws.rs.core.GenericType;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -8,8 +8,8 @@ import io.swagger.client.Pair;
|
||||
import javax.ws.rs.core.GenericType;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("className")
|
||||
private String className = null;
|
||||
|
||||
@JsonProperty("color")
|
||||
private String color = "red";
|
||||
|
||||
@JsonProperty("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -173,8 +173,8 @@ public class ApiClient {
|
||||
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
// Prevent the authentications from being modified.
|
||||
authentications = Collections.unmodifiableMap(authentications);
|
||||
}
|
||||
|
@ -40,8 +40,8 @@ import java.io.IOException;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
|
@ -39,8 +39,8 @@ import com.google.gson.reflect.TypeToken;
|
||||
import java.io.IOException;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -142,7 +142,7 @@
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<properties>
|
||||
<swagger-core-version>1.5.8</swagger-core-version>
|
||||
<swagger-core-version>1.5.9</swagger-core-version>
|
||||
<retrofit-version>1.9.0</retrofit-version>
|
||||
<okhttp-version>2.7.5</okhttp-version>
|
||||
<jodatime-version>2.9.3</jodatime-version>
|
||||
|
@ -54,10 +54,10 @@ public class ApiClient {
|
||||
this();
|
||||
for(String authName : authNames) {
|
||||
Interceptor auth;
|
||||
if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if (authName == "petstore_auth") {
|
||||
if (authName == "petstore_auth") {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
@ -8,8 +8,8 @@ import retrofit.mime.*;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -7,8 +7,8 @@ import retrofit.http.*;
|
||||
import retrofit.mime.*;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -53,10 +53,10 @@ public class ApiClient {
|
||||
this();
|
||||
for(String authName : authNames) {
|
||||
Interceptor auth;
|
||||
if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if (authName == "petstore_auth") {
|
||||
if (authName == "petstore_auth") {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ import okhttp3.RequestBody;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -9,8 +9,8 @@ import retrofit2.http.*;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**declawed** | **Boolean** | | [optional]
|
||||
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
## Properties
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**className** | **String** | |
|
||||
**color** | **String** | | [optional]
|
||||
**breed** | **String** | | [optional]
|
||||
|
||||
|
||||
|
@ -53,10 +53,10 @@ public class ApiClient {
|
||||
this();
|
||||
for(String authName : authNames) {
|
||||
Interceptor auth;
|
||||
if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if (authName == "petstore_auth") {
|
||||
if (authName == "petstore_auth") {
|
||||
auth = new OAuth(OAuthFlow.implicit, "http://petstore.swagger.io/api/oauth/dialog", "", "write:pets, read:pets");
|
||||
} else if (authName == "api_key") {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else {
|
||||
throw new RuntimeException("auth name \"" + authName + "\" not found in available auth names");
|
||||
}
|
||||
|
@ -10,8 +10,8 @@ import okhttp3.RequestBody;
|
||||
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.joda.time.DateTime;
|
||||
import java.math.BigDecimal;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -9,8 +9,8 @@ import retrofit2.http.*;
|
||||
import okhttp3.RequestBody;
|
||||
|
||||
import io.swagger.client.model.Pet;
|
||||
import java.io.File;
|
||||
import io.swagger.client.model.ModelApiResponse;
|
||||
import java.io.File;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Cat extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
public Cat className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Cat color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Cat declawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Cat extends Animal {
|
||||
return false;
|
||||
}
|
||||
Cat cat = (Cat) o;
|
||||
return Objects.equals(this.className, cat.className) &&
|
||||
Objects.equals(this.color, cat.color) &&
|
||||
Objects.equals(this.declawed, cat.declawed) &&
|
||||
return Objects.equals(this.declawed, cat.declawed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, declawed, super.hashCode());
|
||||
return Objects.hash(declawed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Cat extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" declawed: ").append(toIndentedString(declawed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
@ -37,51 +37,9 @@ import io.swagger.client.model.Animal;
|
||||
*/
|
||||
|
||||
public class Dog extends Animal {
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
@SerializedName("color")
|
||||
private String color = "red";
|
||||
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
public Dog className(String className) {
|
||||
this.className = className;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get className
|
||||
* @return className
|
||||
**/
|
||||
@ApiModelProperty(example = "null", required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
public Dog color(String color) {
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@ApiModelProperty(example = "null", value = "")
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public Dog breed(String breed) {
|
||||
this.breed = breed;
|
||||
return this;
|
||||
@ -110,15 +68,13 @@ public class Dog extends Animal {
|
||||
return false;
|
||||
}
|
||||
Dog dog = (Dog) o;
|
||||
return Objects.equals(this.className, dog.className) &&
|
||||
Objects.equals(this.color, dog.color) &&
|
||||
Objects.equals(this.breed, dog.breed) &&
|
||||
return Objects.equals(this.breed, dog.breed) &&
|
||||
super.equals(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(className, color, breed, super.hashCode());
|
||||
return Objects.hash(breed, super.hashCode());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -126,8 +82,6 @@ public class Dog extends Animal {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
|
||||
sb.append(" className: ").append(toIndentedString(className)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" breed: ").append(toIndentedString(breed)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
|
Loading…
Reference in New Issue
Block a user