forked from loafle/openapi-generator-original
Merge pull request #3177 from wing328/fix_java_class_property
[Java] fix property name "class"
This commit is contained in:
commit
07ce036a9a
@ -471,6 +471,10 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
|
|||||||
// sanitize name
|
// sanitize name
|
||||||
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
|
name = sanitizeName(name); // FIXME: a parameter should not be assigned. Also declare the methods parameters as 'final'.
|
||||||
|
|
||||||
|
if ("class".equals(name.toLowerCase())) {
|
||||||
|
return "PropertyClass";
|
||||||
|
}
|
||||||
|
|
||||||
if("_".equals(name)) {
|
if("_".equals(name)) {
|
||||||
name = "_u";
|
name = "_u";
|
||||||
}
|
}
|
||||||
|
@ -834,6 +834,8 @@ definitions:
|
|||||||
name:
|
name:
|
||||||
type: integer
|
type: integer
|
||||||
format: int32
|
format: int32
|
||||||
|
class:
|
||||||
|
type: string
|
||||||
xml:
|
xml:
|
||||||
name: Name
|
name: Name
|
||||||
Dog:
|
Dog:
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
#foo/**/qux
|
#foo/**/qux
|
||||||
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
# You can also negate patterns with an exclamation (!).
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **Integer** | | [optional]
|
**name** | **Integer** | | [optional]
|
||||||
|
**PropertyClass** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Hello world!
|
|
@ -15,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
|
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,6 +35,23 @@ public class Model200Response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public Model200Response PropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("class")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
@ -43,12 +61,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(this.name, _200Response.name);
|
return Objects.equals(this.name, _200Response.name) &&
|
||||||
|
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -57,6 +76,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -41,10 +41,10 @@ public class ApiClient {
|
|||||||
this();
|
this();
|
||||||
for(String authName : authNames) {
|
for(String authName : authNames) {
|
||||||
RequestInterceptor auth;
|
RequestInterceptor auth;
|
||||||
if (authName == "petstore_auth") {
|
if (authName == "api_key") {
|
||||||
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");
|
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");
|
||||||
} 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");
|
||||||
}
|
}
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
package io.swagger.client;
|
package io.swagger.client;
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,8 +3,8 @@ package io.swagger.client.api;
|
|||||||
import io.swagger.client.ApiClient;
|
import io.swagger.client.ApiClient;
|
||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
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 io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -1,3 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* Swagger Petstore
|
||||||
|
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||||
|
*
|
||||||
|
* OpenAPI spec version: 1.0.0
|
||||||
|
* Contact: apiteam@swagger.io
|
||||||
|
*
|
||||||
|
* NOTE: This class is auto generated by the swagger code generator program.
|
||||||
|
* https://github.com/swagger-api/swagger-codegen.git
|
||||||
|
* Do not edit the class manually.
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
package io.swagger.client.auth;
|
package io.swagger.client.auth;
|
||||||
|
|
||||||
public enum OAuthFlow {
|
public enum OAuthFlow {
|
||||||
|
@ -15,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
|
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,6 +35,23 @@ public class Model200Response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public Model200Response PropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("class")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
@ -43,12 +61,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(this.name, _200Response.name);
|
return Objects.equals(this.name, _200Response.name) &&
|
||||||
|
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -57,6 +76,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
#foo/**/qux
|
#foo/**/qux
|
||||||
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
# You can also negate patterns with an exclamation (!).
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
@ -77,7 +77,6 @@ if(hasProperty('target') && target == 'android') {
|
|||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'maven'
|
apply plugin: 'maven'
|
||||||
|
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_7
|
sourceCompatibility = JavaVersion.VERSION_1_7
|
||||||
targetCompatibility = JavaVersion.VERSION_1_7
|
targetCompatibility = JavaVersion.VERSION_1_7
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **Integer** | | [optional]
|
**name** | **Integer** | | [optional]
|
||||||
|
**PropertyClass** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -104,27 +104,6 @@
|
|||||||
<target>1.7</target>
|
<target>1.7</target>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<!-- For testing build.gradle -->
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>exec-maven-plugin</artifactId>
|
|
||||||
<version>1.2.1</version>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>gradle-test</id>
|
|
||||||
<phase>integration-test</phase>
|
|
||||||
<goals>
|
|
||||||
<goal>exec</goal>
|
|
||||||
</goals>
|
|
||||||
<configuration>
|
|
||||||
<executable>gradle</executable>
|
|
||||||
<arguments>
|
|
||||||
<argument>check</argument>
|
|
||||||
</arguments>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -15,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
|
|||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
|
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -34,6 +35,23 @@ public class Model200Response {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
public Model200Response PropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(example = "null", value = "")
|
||||||
|
@JsonProperty("class")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(java.lang.Object o) {
|
public boolean equals(java.lang.Object o) {
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
@ -43,12 +61,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(this.name, _200Response.name);
|
return Objects.equals(this.name, _200Response.name) &&
|
||||||
|
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -57,6 +76,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
#foo/**/qux
|
#foo/**/qux
|
||||||
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
# You can also negate patterns with an exclamation (!).
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **Integer** | | [optional]
|
**name** | **Integer** | | [optional]
|
||||||
|
**PropertyClass** | **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("petstore_auth", new OAuth());
|
|
||||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||||
|
authentications.put("petstore_auth", new OAuth());
|
||||||
// Prevent the authentications from being modified.
|
// Prevent the authentications from being modified.
|
||||||
authentications = Collections.unmodifiableMap(authentications);
|
authentications = Collections.unmodifiableMap(authentications);
|
||||||
}
|
}
|
||||||
|
@ -39,8 +39,8 @@ import com.google.gson.reflect.TypeToken;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
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 io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
import java.lang.reflect.Type;
|
import java.lang.reflect.Type;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -39,6 +39,8 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
public class Model200Response {
|
public class Model200Response {
|
||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
@SerializedName("class")
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get name
|
* Get name
|
||||||
@ -58,6 +60,24 @@ public class Model200Response {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get PropertyClass
|
||||||
|
* @return PropertyClass
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set PropertyClass
|
||||||
|
*
|
||||||
|
* @param PropertyClass PropertyClass
|
||||||
|
*/
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -68,12 +88,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(this.name, _200Response.name);
|
return Objects.equals(this.name, _200Response.name) &&
|
||||||
|
Objects.equals(this.PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -82,6 +103,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||||
#foo/**/qux
|
#foo/**/qux
|
||||||
# Thsi matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||||
|
|
||||||
# You can also negate patterns with an exclamation (!).
|
# You can also negate patterns with an exclamation (!).
|
||||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||||
|
@ -54,10 +54,10 @@ public class ApiClient {
|
|||||||
this();
|
this();
|
||||||
for(String authName : authNames) {
|
for(String authName : authNames) {
|
||||||
Interceptor auth;
|
Interceptor auth;
|
||||||
if (authName == "petstore_auth") {
|
if (authName == "api_key") {
|
||||||
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");
|
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");
|
||||||
} 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");
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,8 @@ import retrofit.http.*;
|
|||||||
import retrofit.mime.*;
|
import retrofit.mime.*;
|
||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
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 io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -18,6 +18,9 @@ public class Model200Response {
|
|||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
|
||||||
|
@SerializedName("class")
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -28,6 +31,16 @@ public class Model200Response {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -38,12 +51,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(name, _200Response.name);
|
return Objects.equals(name, _200Response.name) &&
|
||||||
|
Objects.equals(PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -52,6 +66,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **Integer** | | [optional]
|
**name** | **Integer** | | [optional]
|
||||||
|
**PropertyClass** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ public class ApiClient {
|
|||||||
this();
|
this();
|
||||||
for(String authName : authNames) {
|
for(String authName : authNames) {
|
||||||
Interceptor auth;
|
Interceptor auth;
|
||||||
if (authName == "petstore_auth") {
|
if (authName == "api_key") {
|
||||||
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");
|
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");
|
||||||
} 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");
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ import retrofit2.http.*;
|
|||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
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 io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -18,6 +18,9 @@ public class Model200Response {
|
|||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
|
||||||
|
@SerializedName("class")
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -28,6 +31,16 @@ public class Model200Response {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -38,12 +51,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(name, _200Response.name);
|
return Objects.equals(name, _200Response.name) &&
|
||||||
|
Objects.equals(PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -52,6 +66,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
@ -13,3 +13,9 @@
|
|||||||
|
|
||||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||||
hs_err_pid*
|
hs_err_pid*
|
||||||
|
|
||||||
|
# build files
|
||||||
|
**/target
|
||||||
|
target
|
||||||
|
.gradle
|
||||||
|
build
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
Name | Type | Description | Notes
|
Name | Type | Description | Notes
|
||||||
------------ | ------------- | ------------- | -------------
|
------------ | ------------- | ------------- | -------------
|
||||||
**name** | **Integer** | | [optional]
|
**name** | **Integer** | | [optional]
|
||||||
|
**PropertyClass** | **String** | | [optional]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -54,10 +54,10 @@ public class ApiClient {
|
|||||||
this();
|
this();
|
||||||
for(String authName : authNames) {
|
for(String authName : authNames) {
|
||||||
Interceptor auth;
|
Interceptor auth;
|
||||||
if (authName == "petstore_auth") {
|
if (authName == "api_key") {
|
||||||
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");
|
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");
|
||||||
} 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");
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,8 @@ import retrofit2.http.*;
|
|||||||
import okhttp3.RequestBody;
|
import okhttp3.RequestBody;
|
||||||
|
|
||||||
import org.joda.time.LocalDate;
|
import org.joda.time.LocalDate;
|
||||||
import java.math.BigDecimal;
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
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 io.swagger.client.model.ModelApiResponse;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import io.swagger.client.model.ModelApiResponse;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -18,6 +18,9 @@ public class Model200Response {
|
|||||||
@SerializedName("name")
|
@SerializedName("name")
|
||||||
private Integer name = null;
|
private Integer name = null;
|
||||||
|
|
||||||
|
@SerializedName("class")
|
||||||
|
private String PropertyClass = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
**/
|
**/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
@ -28,6 +31,16 @@ public class Model200Response {
|
|||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
**/
|
||||||
|
@ApiModelProperty(value = "")
|
||||||
|
public String getPropertyClass() {
|
||||||
|
return PropertyClass;
|
||||||
|
}
|
||||||
|
public void setPropertyClass(String PropertyClass) {
|
||||||
|
this.PropertyClass = PropertyClass;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object o) {
|
public boolean equals(Object o) {
|
||||||
@ -38,12 +51,13 @@ public class Model200Response {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Model200Response _200Response = (Model200Response) o;
|
Model200Response _200Response = (Model200Response) o;
|
||||||
return Objects.equals(name, _200Response.name);
|
return Objects.equals(name, _200Response.name) &&
|
||||||
|
Objects.equals(PropertyClass, _200Response.PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(name);
|
return Objects.hash(name, PropertyClass);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -52,6 +66,7 @@ public class Model200Response {
|
|||||||
sb.append("class Model200Response {\n");
|
sb.append("class Model200Response {\n");
|
||||||
|
|
||||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||||
|
sb.append(" PropertyClass: ").append(toIndentedString(PropertyClass)).append("\n");
|
||||||
sb.append("}");
|
sb.append("}");
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user