set supportInheritance to true for java based gens

This commit is contained in:
cbornet
2016-07-18 16:33:20 +02:00
parent 0d9878373c
commit 421c462ba9
58 changed files with 68 additions and 829 deletions

View File

@@ -4,8 +4,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | | [optional]
**declawed** | **Boolean** | | [optional]

View File

@@ -4,8 +4,6 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**className** | **String** | |
**color** | **String** | | [optional]
**breed** | **String** | | [optional]

View File

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

View File

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

View File

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

View File

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

View File

@@ -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();

View File

@@ -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();