mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-19 06:57:06 +00:00
Merge pull request #2513 from jaz-ah/issue/2512
[Android] fix issue 2512: crash w/ NPE when dereferencing networkStatus which c…
This commit is contained in:
@@ -121,7 +121,10 @@ public class {{classname}} {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
|
||||
@@ -70,7 +70,7 @@ ext {
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.gson:gson:$gson_version"
|
||||
compile "org.apache.httpcomponents:httpcore:$httpclient_version"
|
||||
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
|
||||
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
|
||||
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>${swagger-annotations-version}</version>
|
||||
<version>${swagger-core-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.gson</groupId>
|
||||
@@ -145,7 +145,7 @@
|
||||
</repository>
|
||||
</repositories>
|
||||
<properties>
|
||||
<swagger-annotations-version>1.5.4</swagger-annotations-version>
|
||||
<swagger-core-version>1.5.8</swagger-core-version>
|
||||
<gson-version>2.3.1</gson-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin-version>1.0.0</maven-plugin-version>
|
||||
|
||||
@@ -35,10 +35,22 @@ public class JsonUtil {
|
||||
public static Type getListTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("Animal".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Animal>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Cat".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Cat>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Category>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Dog".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Dog>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<InlineResponse200>>(){}.getType();
|
||||
}
|
||||
@@ -81,10 +93,22 @@ public class JsonUtil {
|
||||
public static Type getTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("Animal".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Animal>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Cat".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Cat>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Category>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Dog".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Dog>(){}.getType();
|
||||
}
|
||||
|
||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<InlineResponse200>(){}.getType();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Animal {
|
||||
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Animal {\n");
|
||||
|
||||
sb.append(" className: ").append(className).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Cat extends Animal {
|
||||
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
public void setDeclawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" " + super.toString()).append("\n");
|
||||
sb.append(" className: ").append(className).append("\n");
|
||||
sb.append(" declawed: ").append(declawed).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Dog extends Animal {
|
||||
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getBreed() {
|
||||
return breed;
|
||||
}
|
||||
public void setBreed(String breed) {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" " + super.toString()).append("\n");
|
||||
sb.append(" className: ").append(className).append("\n");
|
||||
sb.append(" breed: ").append(breed).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -10,31 +10,42 @@ import com.google.gson.annotations.SerializedName;
|
||||
@ApiModel(description = "")
|
||||
public class InlineResponse200 {
|
||||
|
||||
@SerializedName("tags")
|
||||
private List<Tag> tags = null;
|
||||
@SerializedName("photoUrls")
|
||||
private List<String> photoUrls = null;
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
@SerializedName("id")
|
||||
private Long id = null;
|
||||
@SerializedName("category")
|
||||
private Object category = null;
|
||||
@SerializedName("tags")
|
||||
private List<Tag> tags = null;
|
||||
public enum StatusEnum {
|
||||
available, pending, sold,
|
||||
};
|
||||
@SerializedName("status")
|
||||
private StatusEnum status = null;
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
@SerializedName("photoUrls")
|
||||
private List<String> photoUrls = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@@ -60,6 +71,17 @@ public class InlineResponse200 {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@@ -72,40 +94,18 @@ public class InlineResponse200 {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class InlineResponse200 {\n");
|
||||
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" category: ").append(category).append("\n");
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* Model for testing model name starting with number
|
||||
**/
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
public class Model200Response {
|
||||
|
||||
@SerializedName("name")
|
||||
|
||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
**/
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
public class ModelReturn {
|
||||
|
||||
@SerializedName("return")
|
||||
|
||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* Model for testing model name same as property name
|
||||
**/
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
public class Name {
|
||||
|
||||
@SerializedName("name")
|
||||
|
||||
@@ -6,10 +6,8 @@ buildscript {
|
||||
jcenter()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:1.5.0'
|
||||
|
||||
classpath 'com.android.tools.build:gradle:1.5.+'
|
||||
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,9 +53,10 @@ android {
|
||||
ext {
|
||||
swagger_annotations_version = "1.5.0"
|
||||
gson_version = "2.3.1"
|
||||
httpclient_version = "4.3.3"
|
||||
httpclient_version = "4.5.2"
|
||||
httpcore_version = "4.4.4"
|
||||
volley_version = "1.0.19"
|
||||
junit_version = "4.8.1"
|
||||
junit_version = "4.12"
|
||||
robolectric_version = "3.0"
|
||||
concurrent_unit_version = "0.4.2"
|
||||
}
|
||||
@@ -65,7 +64,7 @@ ext {
|
||||
dependencies {
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "com.google.code.gson:gson:$gson_version"
|
||||
compile "org.apache.httpcomponents:httpcore:$httpclient_version"
|
||||
compile "org.apache.httpcomponents:httpcore:$httpcore_version"
|
||||
compile "org.apache.httpcomponents:httpmime:$httpclient_version"
|
||||
compile "com.mcxiaoke.volley:library:${volley_version}@aar"
|
||||
testCompile "junit:junit:$junit_version"
|
||||
|
||||
@@ -189,50 +189,14 @@ public class ApiInvoker {
|
||||
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
INSTANCE.authentications = new HashMap<String, Authentication>();
|
||||
|
||||
|
||||
INSTANCE.authentications.put("test_api_key_header", new ApiKeyAuth("header", "test_api_key_header"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INSTANCE.authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INSTANCE.authentications.put("test_http_basic", new HttpBasicAuth());
|
||||
|
||||
|
||||
|
||||
|
||||
INSTANCE.authentications.put("test_api_client_secret", new ApiKeyAuth("header", "x-test_api_client_secret"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INSTANCE.authentications.put("test_api_client_id", new ApiKeyAuth("header", "x-test_api_client_id"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
INSTANCE.authentications.put("test_api_key_query", new ApiKeyAuth("query", "test_api_key_query"));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// TODO: comment out below as OAuth does not exist
|
||||
//INSTANCE.authentications.put("petstore_auth", new OAuth());
|
||||
|
||||
|
||||
INSTANCE.authentications.put("test_api_client_id", new ApiKeyAuth("header", "x-test_api_client_id"));
|
||||
INSTANCE.authentications.put("test_api_client_secret", new ApiKeyAuth("header", "x-test_api_client_secret"));
|
||||
INSTANCE.authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
INSTANCE.authentications.put("test_http_basic", new HttpBasicAuth());
|
||||
INSTANCE.authentications.put("test_api_key_query", new ApiKeyAuth("query", "test_api_key_query"));
|
||||
INSTANCE.authentications.put("test_api_key_header", new ApiKeyAuth("header", "test_api_key_header"));
|
||||
// Prevent the authentications from being modified.
|
||||
INSTANCE.authentications = Collections.unmodifiableMap(INSTANCE.authentications);
|
||||
}
|
||||
|
||||
@@ -35,10 +35,26 @@ public class JsonUtil {
|
||||
public static Type getListTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("Animal".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Animal>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Cat".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Cat>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Category>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Dog".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<Dog>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("FormatTest".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<FormatTest>>(){}.getType();
|
||||
}
|
||||
|
||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<List<InlineResponse200>>(){}.getType();
|
||||
}
|
||||
@@ -81,10 +97,26 @@ public class JsonUtil {
|
||||
public static Type getTypeForDeserialization(Class cls) {
|
||||
String className = cls.getSimpleName();
|
||||
|
||||
if ("Animal".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Animal>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Cat".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Cat>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Category".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Category>(){}.getType();
|
||||
}
|
||||
|
||||
if ("Dog".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<Dog>(){}.getType();
|
||||
}
|
||||
|
||||
if ("FormatTest".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<FormatTest>(){}.getType();
|
||||
}
|
||||
|
||||
if ("InlineResponse200".equalsIgnoreCase(className)) {
|
||||
return new TypeToken<InlineResponse200>(){}.getType();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,6 @@ public class PetApi {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
*
|
||||
@@ -68,8 +67,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
};
|
||||
@@ -84,8 +81,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -102,7 +98,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -132,8 +131,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
};
|
||||
@@ -148,8 +145,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -158,11 +154,7 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -174,7 +166,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*
|
||||
@@ -186,7 +177,7 @@ public class PetApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -197,8 +188,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
};
|
||||
@@ -213,8 +202,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -231,7 +219,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -250,7 +241,7 @@ public class PetApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||
String path = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -261,8 +252,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
};
|
||||
@@ -277,8 +266,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -287,11 +275,7 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -303,7 +287,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a pet
|
||||
*
|
||||
@@ -332,11 +315,8 @@ public class PetApi {
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
|
||||
|
||||
headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -351,8 +331,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -369,7 +348,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -404,11 +386,8 @@ public class PetApi {
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
|
||||
|
||||
headerParams.put("api_key", ApiInvoker.parameterToString(apiKey));
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -423,8 +402,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -433,11 +411,7 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -449,7 +423,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma separated strings
|
||||
@@ -470,12 +443,9 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -490,8 +460,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -508,7 +477,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -536,12 +508,9 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "status", status));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -556,8 +525,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -566,16 +534,11 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((List<Pet>) ApiInvoker.deserialize(localVarResponse, "array", Pet.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -587,7 +550,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Pets by tags
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
@@ -608,12 +570,9 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -628,8 +587,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -646,7 +604,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -674,12 +635,9 @@ public class PetApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("multi", "tags", tags));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -694,8 +652,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -704,16 +661,11 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((List<Pet>) ApiInvoker.deserialize(localVarResponse, "array", Pet.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -725,7 +677,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@@ -754,8 +705,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -770,10 +719,9 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||
@@ -788,7 +736,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -824,8 +775,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -840,26 +789,20 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((Pet) ApiInvoker.deserialize(localVarResponse, "", Pet.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -871,7 +814,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test inline arbitrary object return by 'Find pet by ID'
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@@ -889,7 +831,7 @@ public class PetApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -900,8 +842,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -916,10 +856,9 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||
@@ -934,7 +873,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -959,7 +901,7 @@ public class PetApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
String path = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -970,8 +912,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -986,26 +926,20 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((InlineResponse200) ApiInvoker.deserialize(localVarResponse, "", InlineResponse200.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -1017,7 +951,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
@@ -1035,7 +968,7 @@ public class PetApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -1046,8 +979,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -1062,10 +993,9 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||
@@ -1080,7 +1010,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -1105,7 +1038,7 @@ public class PetApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
String path = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json").replaceAll("\\{" + "petId" + "\\}", apiInvoker.escapeString(petId.toString()));
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -1116,8 +1049,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -1132,26 +1063,20 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key", "petstore_auth" };
|
||||
String[] authNames = new String[] { "petstore_auth", "api_key" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((byte[]) ApiInvoker.deserialize(localVarResponse, "", byte[].class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -1163,7 +1088,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
*
|
||||
@@ -1186,8 +1110,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
};
|
||||
@@ -1202,8 +1124,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -1220,7 +1141,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -1250,8 +1174,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/json","application/xml"
|
||||
};
|
||||
@@ -1266,8 +1188,7 @@ public class PetApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
|
||||
@@ -1276,11 +1197,7 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -1292,7 +1209,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
@@ -1323,8 +1239,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/x-www-form-urlencoded"
|
||||
};
|
||||
@@ -1348,8 +1262,7 @@ public class PetApi {
|
||||
} else {
|
||||
// normal form params
|
||||
formParams.put("name", ApiInvoker.parameterToString(name));
|
||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
|
||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
@@ -1367,7 +1280,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -1403,8 +1319,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"application/x-www-form-urlencoded"
|
||||
};
|
||||
@@ -1428,8 +1342,7 @@ public class PetApi {
|
||||
} else {
|
||||
// normal form params
|
||||
formParams.put("name", ApiInvoker.parameterToString(name));
|
||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
|
||||
formParams.put("status", ApiInvoker.parameterToString(status));
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
@@ -1439,11 +1352,7 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -1455,7 +1364,6 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image
|
||||
*
|
||||
@@ -1486,8 +1394,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"multipart/form-data"
|
||||
};
|
||||
@@ -1512,7 +1418,6 @@ public class PetApi {
|
||||
// normal form params
|
||||
formParams.put("additionalMetadata", ApiInvoker.parameterToString(additionalMetadata));
|
||||
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
@@ -1530,7 +1435,10 @@ public class PetApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -1566,8 +1474,6 @@ public class PetApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
"multipart/form-data"
|
||||
};
|
||||
@@ -1592,7 +1498,6 @@ public class PetApi {
|
||||
// normal form params
|
||||
formParams.put("additionalMetadata", ApiInvoker.parameterToString(additionalMetadata));
|
||||
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "petstore_auth" };
|
||||
@@ -1602,11 +1507,7 @@ public class PetApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -1618,5 +1519,4 @@ public class PetApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ public class StoreApi {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
@@ -73,8 +72,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -89,8 +86,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -107,7 +103,10 @@ public class StoreApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -143,8 +142,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -159,8 +156,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -169,11 +165,7 @@ public class StoreApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -185,7 +177,6 @@ public class StoreApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds orders by status
|
||||
* A single status value can be provided as a string
|
||||
@@ -206,12 +197,9 @@ public class StoreApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "status", status));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -226,8 +214,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||
|
||||
@@ -244,7 +231,10 @@ public class StoreApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -272,12 +262,9 @@ public class StoreApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "status", status));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -292,8 +279,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||
|
||||
@@ -302,16 +288,11 @@ public class StoreApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((List<Order>) ApiInvoker.deserialize(localVarResponse, "array", Order.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -323,7 +304,6 @@ public class StoreApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
@@ -345,8 +325,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -361,8 +339,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
@@ -379,7 +356,10 @@ public class StoreApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -409,8 +389,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -425,8 +403,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
@@ -435,16 +412,11 @@ public class StoreApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((Map<String, Integer>) ApiInvoker.deserialize(localVarResponse, "map", Map.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -456,7 +428,6 @@ public class StoreApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test arbitrary object return by 'Get inventory'
|
||||
* Returns an arbitrary object which is actually a map of status codes to quantities
|
||||
@@ -467,7 +438,7 @@ public class StoreApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
||||
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -478,8 +449,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -494,8 +463,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
@@ -512,7 +480,10 @@ public class StoreApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -531,7 +502,7 @@ public class StoreApi {
|
||||
|
||||
|
||||
// create path and map variables
|
||||
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
||||
String path = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
List<Pair> queryParams = new ArrayList<Pair>();
|
||||
@@ -542,8 +513,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -558,8 +527,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "api_key" };
|
||||
|
||||
@@ -568,16 +536,11 @@ public class StoreApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((Object) ApiInvoker.deserialize(localVarResponse, "", Object.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -589,10 +552,9 @@ public class StoreApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
* @return Order
|
||||
*/
|
||||
@@ -618,8 +580,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -634,10 +594,9 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_api_key_header", "test_api_key_query" };
|
||||
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||
|
||||
try {
|
||||
String localVarResponse = apiInvoker.invokeAPI (basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames);
|
||||
@@ -652,7 +611,10 @@ public class StoreApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -662,7 +624,7 @@ public class StoreApi {
|
||||
|
||||
/**
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched
|
||||
*/
|
||||
public void getOrderById (String orderId, final Response.Listener<Order> responseListener, final Response.ErrorListener errorListener) {
|
||||
@@ -688,8 +650,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -704,26 +664,20 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_api_key_header", "test_api_key_query" };
|
||||
String[] authNames = new String[] { "test_api_key_query", "test_api_key_header" };
|
||||
|
||||
try {
|
||||
apiInvoker.invokeAPI(basePath, path, "GET", queryParams, postBody, headerParams, formParams, contentType, authNames,
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((Order) ApiInvoker.deserialize(localVarResponse, "", Order.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -735,7 +689,6 @@ public class StoreApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
*
|
||||
@@ -758,8 +711,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -774,8 +725,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||
|
||||
@@ -792,7 +742,10 @@ public class StoreApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -822,8 +775,6 @@ public class StoreApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -838,8 +789,7 @@ public class StoreApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_api_client_id", "test_api_client_secret" };
|
||||
|
||||
@@ -848,16 +798,11 @@ public class StoreApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((Order) ApiInvoker.deserialize(localVarResponse, "", Order.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -869,5 +814,4 @@ public class StoreApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ public class UserApi {
|
||||
return basePath;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -67,8 +66,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -83,8 +80,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -101,7 +97,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -131,8 +130,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -147,8 +144,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -157,11 +153,7 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -173,7 +165,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
@@ -196,8 +187,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -212,8 +201,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -230,7 +218,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -260,8 +251,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -276,8 +265,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -286,11 +274,7 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -302,7 +286,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
@@ -325,8 +308,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -341,8 +322,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -359,7 +339,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -389,8 +372,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -405,8 +386,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -415,11 +395,7 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -431,7 +407,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -460,8 +435,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -476,8 +449,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_http_basic" };
|
||||
|
||||
@@ -494,7 +466,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -530,8 +505,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -546,8 +519,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { "test_http_basic" };
|
||||
|
||||
@@ -556,11 +528,7 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -572,7 +540,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user by user name
|
||||
*
|
||||
@@ -601,8 +568,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -617,8 +582,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -635,7 +599,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -671,8 +638,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -687,8 +652,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -697,16 +661,11 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((User) ApiInvoker.deserialize(localVarResponse, "", User.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -718,7 +677,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs user into the system
|
||||
*
|
||||
@@ -740,14 +698,10 @@ public class UserApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "username", username));
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "password", password));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -762,8 +716,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -780,7 +733,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -808,14 +764,10 @@ public class UserApi {
|
||||
// form params
|
||||
Map<String, String> formParams = new HashMap<String, String>();
|
||||
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "username", username));
|
||||
|
||||
queryParams.addAll(ApiInvoker.parameterToPairs("", "password", password));
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -830,8 +782,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -840,16 +791,11 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
try {
|
||||
responseListener.onResponse((String) ApiInvoker.deserialize(localVarResponse, "", String.class));
|
||||
|
||||
|
||||
|
||||
} catch (ApiException exception) {
|
||||
errorListener.onErrorResponse(new VolleyError(exception));
|
||||
}
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -861,7 +807,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
@@ -883,8 +828,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -899,8 +842,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -917,7 +859,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -947,8 +892,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -963,8 +906,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -973,11 +915,7 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -989,7 +927,6 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updated user
|
||||
* This can only be done by the logged in user.
|
||||
@@ -1019,8 +956,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -1035,8 +970,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -1053,7 +987,10 @@ public class UserApi {
|
||||
throw ex;
|
||||
} catch (ExecutionException ex) {
|
||||
if(ex.getCause() instanceof VolleyError) {
|
||||
throw new ApiException(((VolleyError) ex.getCause()).networkResponse.statusCode, ((VolleyError) ex.getCause()).getMessage());
|
||||
VolleyError volleyError = (VolleyError)ex.getCause();
|
||||
if (volleyError.networkResponse != null) {
|
||||
throw new ApiException(volleyError.networkResponse.statusCode, volleyError.getMessage());
|
||||
}
|
||||
}
|
||||
throw ex;
|
||||
} catch (TimeoutException ex) {
|
||||
@@ -1089,8 +1026,6 @@ public class UserApi {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
String[] contentTypes = {
|
||||
|
||||
};
|
||||
@@ -1105,8 +1040,7 @@ public class UserApi {
|
||||
postBody = httpEntity;
|
||||
} else {
|
||||
// normal form params
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
@@ -1115,11 +1049,7 @@ public class UserApi {
|
||||
new Response.Listener<String>() {
|
||||
@Override
|
||||
public void onResponse(String localVarResponse) {
|
||||
|
||||
|
||||
responseListener.onResponse(localVarResponse);
|
||||
|
||||
|
||||
}
|
||||
}, new Response.ErrorListener() {
|
||||
@Override
|
||||
@@ -1131,5 +1061,4 @@ public class UserApi {
|
||||
errorListener.onErrorResponse(new VolleyError(ex));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Animal {
|
||||
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Animal {\n");
|
||||
|
||||
sb.append(" className: ").append(className).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Cat extends Animal {
|
||||
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
@SerializedName("declawed")
|
||||
private Boolean declawed = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
public void setDeclawed(Boolean declawed) {
|
||||
this.declawed = declawed;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Cat {\n");
|
||||
sb.append(" " + super.toString()).append("\n");
|
||||
sb.append(" className: ").append(className).append("\n");
|
||||
sb.append(" declawed: ").append(declawed).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,6 @@ public class Category {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -24,7 +23,6 @@ public class Category {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -36,7 +34,6 @@ public class Category {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import io.swagger.client.model.Animal;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class Dog extends Animal {
|
||||
|
||||
@SerializedName("className")
|
||||
private String className = null;
|
||||
@SerializedName("breed")
|
||||
private String breed = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getClassName() {
|
||||
return className;
|
||||
}
|
||||
public void setClassName(String className) {
|
||||
this.className = className;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getBreed() {
|
||||
return breed;
|
||||
}
|
||||
public void setBreed(String breed) {
|
||||
this.breed = breed;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class Dog {\n");
|
||||
sb.append(" " + super.toString()).append("\n");
|
||||
sb.append(" className: ").append(className).append("\n");
|
||||
sb.append(" breed: ").append(breed).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
public class FormatTest {
|
||||
|
||||
@SerializedName("integer")
|
||||
private Integer integer = null;
|
||||
@SerializedName("int32")
|
||||
private Integer int32 = null;
|
||||
@SerializedName("int64")
|
||||
private Long int64 = null;
|
||||
@SerializedName("number")
|
||||
private BigDecimal number = null;
|
||||
@SerializedName("float")
|
||||
private Float _float = null;
|
||||
@SerializedName("double")
|
||||
private Double _double = null;
|
||||
@SerializedName("string")
|
||||
private String string = null;
|
||||
@SerializedName("byte")
|
||||
private byte[] _byte = null;
|
||||
@SerializedName("binary")
|
||||
private byte[] binary = null;
|
||||
@SerializedName("date")
|
||||
private Date date = null;
|
||||
@SerializedName("dateTime")
|
||||
private Date dateTime = null;
|
||||
@SerializedName("password")
|
||||
private String password = null;
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Integer getInteger() {
|
||||
return integer;
|
||||
}
|
||||
public void setInteger(Integer integer) {
|
||||
this.integer = integer;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Integer getInt32() {
|
||||
return int32;
|
||||
}
|
||||
public void setInt32(Integer int32) {
|
||||
this.int32 = int32;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Long getInt64() {
|
||||
return int64;
|
||||
}
|
||||
public void setInt64(Long int64) {
|
||||
this.int64 = int64;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public BigDecimal getNumber() {
|
||||
return number;
|
||||
}
|
||||
public void setNumber(BigDecimal number) {
|
||||
this.number = number;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Float getFloat() {
|
||||
return _float;
|
||||
}
|
||||
public void setFloat(Float _float) {
|
||||
this._float = _float;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Double getDouble() {
|
||||
return _double;
|
||||
}
|
||||
public void setDouble(Double _double) {
|
||||
this._double = _double;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getString() {
|
||||
return string;
|
||||
}
|
||||
public void setString(String string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public byte[] getByte() {
|
||||
return _byte;
|
||||
}
|
||||
public void setByte(byte[] _byte) {
|
||||
this._byte = _byte;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public byte[] getBinary() {
|
||||
return binary;
|
||||
}
|
||||
public void setBinary(byte[] binary) {
|
||||
this.binary = binary;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Date getDate() {
|
||||
return date;
|
||||
}
|
||||
public void setDate(Date date) {
|
||||
this.date = date;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Date getDateTime() {
|
||||
return dateTime;
|
||||
}
|
||||
public void setDateTime(Date dateTime) {
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class FormatTest {\n");
|
||||
|
||||
sb.append(" integer: ").append(integer).append("\n");
|
||||
sb.append(" int32: ").append(int32).append("\n");
|
||||
sb.append(" int64: ").append(int64).append("\n");
|
||||
sb.append(" number: ").append(number).append("\n");
|
||||
sb.append(" _float: ").append(_float).append("\n");
|
||||
sb.append(" _double: ").append(_double).append("\n");
|
||||
sb.append(" string: ").append(string).append("\n");
|
||||
sb.append(" _byte: ").append(_byte).append("\n");
|
||||
sb.append(" binary: ").append(binary).append("\n");
|
||||
sb.append(" date: ").append(date).append("\n");
|
||||
sb.append(" dateTime: ").append(dateTime).append("\n");
|
||||
sb.append(" password: ").append(password).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
@@ -10,33 +10,41 @@ import com.google.gson.annotations.SerializedName;
|
||||
@ApiModel(description = "")
|
||||
public class InlineResponse200 {
|
||||
|
||||
@SerializedName("tags")
|
||||
private List<Tag> tags = null;
|
||||
@SerializedName("photoUrls")
|
||||
private List<String> photoUrls = null;
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
@SerializedName("id")
|
||||
private Long id = null;
|
||||
@SerializedName("category")
|
||||
private Object category = null;
|
||||
@SerializedName("tags")
|
||||
private List<Tag> tags = null;
|
||||
public enum StatusEnum {
|
||||
available, pending, sold,
|
||||
};
|
||||
@SerializedName("status")
|
||||
private StatusEnum status = null;
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
@SerializedName("photoUrls")
|
||||
private List<String> photoUrls = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@@ -48,7 +56,6 @@ public class InlineResponse200 {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -59,6 +66,15 @@ public class InlineResponse200 {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<Tag> getTags() {
|
||||
return tags;
|
||||
}
|
||||
public void setTags(List<Tag> tags) {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
@@ -72,40 +88,17 @@ public class InlineResponse200 {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public List<String> getPhotoUrls() {
|
||||
return photoUrls;
|
||||
}
|
||||
public void setPhotoUrls(List<String> photoUrls) {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class InlineResponse200 {\n");
|
||||
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append(" id: ").append(id).append("\n");
|
||||
sb.append(" category: ").append(category).append("\n");
|
||||
sb.append(" tags: ").append(tags).append("\n");
|
||||
sb.append(" status: ").append(status).append("\n");
|
||||
sb.append(" name: ").append(name).append("\n");
|
||||
sb.append(" photoUrls: ").append(photoUrls).append("\n");
|
||||
sb.append("}\n");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@@ -5,13 +5,15 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* Model for testing model name starting with number
|
||||
**/
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
public class Model200Response {
|
||||
|
||||
@SerializedName("name")
|
||||
private Integer name = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -23,7 +25,6 @@ public class Model200Response {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -5,13 +5,15 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
**/
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
public class ModelReturn {
|
||||
|
||||
@SerializedName("return")
|
||||
private Integer _return = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -23,7 +25,6 @@ public class ModelReturn {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -5,7 +5,10 @@ import io.swagger.annotations.*;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
|
||||
|
||||
@ApiModel(description = "")
|
||||
/**
|
||||
* Model for testing model name same as property name
|
||||
**/
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
public class Name {
|
||||
|
||||
@SerializedName("name")
|
||||
@@ -13,10 +16,9 @@ public class Name {
|
||||
@SerializedName("snake_case")
|
||||
private Integer snakeCase = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public Integer getName() {
|
||||
return name;
|
||||
}
|
||||
@@ -24,7 +26,6 @@ public class Name {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -36,7 +37,6 @@ public class Name {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -25,7 +25,6 @@ public class Order {
|
||||
@SerializedName("complete")
|
||||
private Boolean complete = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -36,7 +35,6 @@ public class Order {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -47,7 +45,6 @@ public class Order {
|
||||
this.petId = petId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -58,7 +55,6 @@ public class Order {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -69,7 +65,6 @@ public class Order {
|
||||
this.shipDate = shipDate;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Order Status
|
||||
**/
|
||||
@@ -81,7 +76,6 @@ public class Order {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -93,7 +87,6 @@ public class Order {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -27,7 +27,6 @@ public class Pet {
|
||||
@SerializedName("status")
|
||||
private StatusEnum status = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -38,7 +37,6 @@ public class Pet {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -49,7 +47,6 @@ public class Pet {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@@ -60,7 +57,6 @@ public class Pet {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
@@ -71,7 +67,6 @@ public class Pet {
|
||||
this.photoUrls = photoUrls;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -82,7 +77,6 @@ public class Pet {
|
||||
this.tags = tags;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* pet status in the store
|
||||
**/
|
||||
@@ -95,7 +89,6 @@ public class Pet {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -11,7 +11,6 @@ public class SpecialModelName {
|
||||
@SerializedName("$special[property.name]")
|
||||
private Long specialPropertyName = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -23,7 +22,6 @@ public class SpecialModelName {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -13,7 +13,6 @@ public class Tag {
|
||||
@SerializedName("name")
|
||||
private String name = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -24,7 +23,6 @@ public class Tag {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -36,7 +34,6 @@ public class Tag {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
@@ -25,7 +25,6 @@ public class User {
|
||||
@SerializedName("userStatus")
|
||||
private Integer userStatus = null;
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -36,7 +35,6 @@ public class User {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -47,7 +45,6 @@ public class User {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -58,7 +55,6 @@ public class User {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -69,7 +65,6 @@ public class User {
|
||||
this.lastName = lastName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -80,7 +75,6 @@ public class User {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -91,7 +85,6 @@ public class User {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@@ -102,7 +95,6 @@ public class User {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* User Status
|
||||
**/
|
||||
@@ -115,7 +107,6 @@ public class User {
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
Reference in New Issue
Block a user