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