Merge branch 'jfiala-beanval_2549'

This commit is contained in:
wing328
2016-12-13 00:05:03 +08:00
34 changed files with 803 additions and 439 deletions

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -16,7 +16,7 @@ package io.swagger.client;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -13,7 +13,7 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -13,7 +13,7 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class Pair {
private String name = "";
private String value = "";

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -13,7 +13,7 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -59,12 +59,6 @@ public class PetApi {
private com.squareup.okhttp.Call addPetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)");
}
// create path and map variables
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
@@ -100,6 +94,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call addPetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling addPet(Async)");
}
com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
return call;
}
/**
@@ -120,7 +131,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> addPetWithHttpInfo(Pet body) throws ApiException {
com.squareup.okhttp.Call call = addPetCall(body, null, null);
com.squareup.okhttp.Call call = addPetValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -153,7 +164,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = addPetValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -161,12 +172,6 @@ public class PetApi {
private com.squareup.okhttp.Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)");
}
// create path and map variables
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@@ -205,6 +210,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call deletePetValidateBeforeCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling deletePet(Async)");
}
com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
return call;
}
/**
@@ -227,7 +249,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> deletePetWithHttpInfo(Long petId, String apiKey) throws ApiException {
com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, null, null);
com.squareup.okhttp.Call call = deletePetValidateBeforeCall(petId, apiKey, null, null);
return apiClient.execute(call);
}
@@ -261,7 +283,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = deletePetValidateBeforeCall(petId, apiKey, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -269,12 +291,6 @@ public class PetApi {
private com.squareup.okhttp.Call findPetsByStatusCall(List<String> status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'status' is set
if (status == null) {
throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)");
}
// create path and map variables
String localVarPath = "/pet/findByStatus".replaceAll("\\{format\\}","json");
@@ -312,6 +328,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call findPetsByStatusValidateBeforeCall(List<String> status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'status' is set
if (status == null) {
throw new ApiException("Missing the required parameter 'status' when calling findPetsByStatus(Async)");
}
com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
return call;
}
/**
@@ -334,7 +367,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<List<Pet>> findPetsByStatusWithHttpInfo(List<String> status) throws ApiException {
com.squareup.okhttp.Call call = findPetsByStatusCall(status, null, null);
com.squareup.okhttp.Call call = findPetsByStatusValidateBeforeCall(status, null, null);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -368,7 +401,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = findPetsByStatusValidateBeforeCall(status, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -377,12 +410,6 @@ public class PetApi {
private com.squareup.okhttp.Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'tags' is set
if (tags == null) {
throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)");
}
// create path and map variables
String localVarPath = "/pet/findByTags".replaceAll("\\{format\\}","json");
@@ -420,6 +447,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'tags' is set
if (tags == null) {
throw new ApiException("Missing the required parameter 'tags' when calling findPetsByTags(Async)");
}
com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
return call;
}
/**
@@ -442,7 +486,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
com.squareup.okhttp.Call call = findPetsByTagsCall(tags, null, null);
com.squareup.okhttp.Call call = findPetsByTagsValidateBeforeCall(tags, null, null);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -476,7 +520,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = findPetsByTagsValidateBeforeCall(tags, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -485,12 +529,6 @@ public class PetApi {
private com.squareup.okhttp.Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)");
}
// create path and map variables
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@@ -527,6 +565,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call getPetByIdValidateBeforeCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling getPetById(Async)");
}
com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
return call;
}
/**
@@ -549,7 +604,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Pet> getPetByIdWithHttpInfo(Long petId) throws ApiException {
com.squareup.okhttp.Call call = getPetByIdCall(petId, null, null);
com.squareup.okhttp.Call call = getPetByIdValidateBeforeCall(petId, null, null);
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -583,7 +638,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = getPetByIdValidateBeforeCall(petId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Pet>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -592,12 +647,6 @@ public class PetApi {
private com.squareup.okhttp.Call updatePetCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling updatePet(Async)");
}
// create path and map variables
String localVarPath = "/pet".replaceAll("\\{format\\}","json");
@@ -633,6 +682,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call updatePetValidateBeforeCall(Pet body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling updatePet(Async)");
}
com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
return call;
}
/**
@@ -653,7 +719,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> updatePetWithHttpInfo(Pet body) throws ApiException {
com.squareup.okhttp.Call call = updatePetCall(body, null, null);
com.squareup.okhttp.Call call = updatePetValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -686,7 +752,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = updatePetValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -694,12 +760,6 @@ public class PetApi {
private com.squareup.okhttp.Call updatePetWithFormCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)");
}
// create path and map variables
String localVarPath = "/pet/{petId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@@ -740,6 +800,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call updatePetWithFormValidateBeforeCall(Long petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling updatePetWithForm(Async)");
}
com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
return call;
}
/**
@@ -764,7 +841,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, null, null);
com.squareup.okhttp.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, null, null);
return apiClient.execute(call);
}
@@ -799,7 +876,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = updatePetWithFormValidateBeforeCall(petId, name, status, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -807,12 +884,6 @@ public class PetApi {
private com.squareup.okhttp.Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)");
}
// create path and map variables
String localVarPath = "/pet/{petId}/uploadImage".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
@@ -853,6 +924,23 @@ public class PetApi {
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call uploadFileValidateBeforeCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'petId' is set
if (petId == null) {
throw new ApiException("Missing the required parameter 'petId' when calling uploadFile(Async)");
}
com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
return call;
}
/**
@@ -879,7 +967,7 @@ public class PetApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<ModelApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, null, null);
com.squareup.okhttp.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, null, null);
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -915,7 +1003,7 @@ public class PetApi {
};
}
com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = uploadFileValidateBeforeCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<ModelApiResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -26,6 +26,7 @@ import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.swagger.client.model.Order;
import java.lang.reflect.Type;
@@ -57,12 +58,6 @@ public class StoreApi {
private com.squareup.okhttp.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)");
}
// create path and map variables
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
@@ -99,6 +94,23 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException("Missing the required parameter 'orderId' when calling deleteOrder(Async)");
}
com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
return call;
}
/**
@@ -119,7 +131,7 @@ public class StoreApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
com.squareup.okhttp.Call call = deleteOrderCall(orderId, null, null);
com.squareup.okhttp.Call call = deleteOrderValidateBeforeCall(orderId, null, null);
return apiClient.execute(call);
}
@@ -152,7 +164,7 @@ public class StoreApi {
};
}
com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = deleteOrderValidateBeforeCall(orderId, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -160,7 +172,6 @@ public class StoreApi {
private com.squareup.okhttp.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/store/inventory".replaceAll("\\{format\\}","json");
@@ -196,6 +207,18 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = getInventoryCall(progressListener, progressRequestListener);
return call;
}
/**
@@ -216,7 +239,7 @@ public class StoreApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = getInventoryCall(null, null);
com.squareup.okhttp.Call call = getInventoryValidateBeforeCall(null, null);
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -249,7 +272,7 @@ public class StoreApi {
};
}
com.squareup.okhttp.Call call = getInventoryCall(progressListener, progressRequestListener);
com.squareup.okhttp.Call call = getInventoryValidateBeforeCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -258,12 +281,6 @@ public class StoreApi {
private com.squareup.okhttp.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)");
}
// create path and map variables
String localVarPath = "/store/order/{orderId}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "orderId" + "\\}", apiClient.escapeString(orderId.toString()));
@@ -300,6 +317,23 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new ApiException("Missing the required parameter 'orderId' when calling getOrderById(Async)");
}
com.squareup.okhttp.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
return call;
}
/**
@@ -322,7 +356,7 @@ public class StoreApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
com.squareup.okhttp.Call call = getOrderByIdCall(orderId, null, null);
com.squareup.okhttp.Call call = getOrderByIdValidateBeforeCall(orderId, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -356,7 +390,7 @@ public class StoreApi {
};
}
com.squareup.okhttp.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = getOrderByIdValidateBeforeCall(orderId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Order>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -365,12 +399,6 @@ public class StoreApi {
private com.squareup.okhttp.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling placeOrder(Async)");
}
// create path and map variables
String localVarPath = "/store/order".replaceAll("\\{format\\}","json");
@@ -406,6 +434,23 @@ public class StoreApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling placeOrder(Async)");
}
com.squareup.okhttp.Call call = placeOrderCall(body, progressListener, progressRequestListener);
return call;
}
/**
@@ -428,7 +473,7 @@ public class StoreApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
com.squareup.okhttp.Call call = placeOrderCall(body, null, null);
com.squareup.okhttp.Call call = placeOrderValidateBeforeCall(body, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -462,7 +507,7 @@ public class StoreApi {
};
}
com.squareup.okhttp.Call call = placeOrderCall(body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = placeOrderValidateBeforeCall(body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Order>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -26,6 +26,7 @@ import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.swagger.client.model.User;
import java.lang.reflect.Type;
@@ -57,12 +58,6 @@ public class UserApi {
private com.squareup.okhttp.Call createUserCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createUser(Async)");
}
// create path and map variables
String localVarPath = "/user".replaceAll("\\{format\\}","json");
@@ -98,6 +93,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call createUserValidateBeforeCall(User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createUser(Async)");
}
com.squareup.okhttp.Call call = createUserCall(body, progressListener, progressRequestListener);
return call;
}
/**
@@ -118,7 +130,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> createUserWithHttpInfo(User body) throws ApiException {
com.squareup.okhttp.Call call = createUserCall(body, null, null);
com.squareup.okhttp.Call call = createUserValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -151,7 +163,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = createUserCall(body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = createUserValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -159,12 +171,6 @@ public class UserApi {
private com.squareup.okhttp.Call createUsersWithArrayInputCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createUsersWithArrayInput(Async)");
}
// create path and map variables
String localVarPath = "/user/createWithArray".replaceAll("\\{format\\}","json");
@@ -200,6 +206,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call createUsersWithArrayInputValidateBeforeCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createUsersWithArrayInput(Async)");
}
com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener);
return call;
}
/**
@@ -220,7 +243,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> createUsersWithArrayInputWithHttpInfo(List<User> body) throws ApiException {
com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, null, null);
com.squareup.okhttp.Call call = createUsersWithArrayInputValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -253,7 +276,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = createUsersWithArrayInputValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -261,12 +284,6 @@ public class UserApi {
private com.squareup.okhttp.Call createUsersWithListInputCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createUsersWithListInput(Async)");
}
// create path and map variables
String localVarPath = "/user/createWithList".replaceAll("\\{format\\}","json");
@@ -302,6 +319,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call createUsersWithListInputValidateBeforeCall(List<User> body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createUsersWithListInput(Async)");
}
com.squareup.okhttp.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener);
return call;
}
/**
@@ -322,7 +356,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> createUsersWithListInputWithHttpInfo(List<User> body) throws ApiException {
com.squareup.okhttp.Call call = createUsersWithListInputCall(body, null, null);
com.squareup.okhttp.Call call = createUsersWithListInputValidateBeforeCall(body, null, null);
return apiClient.execute(call);
}
@@ -355,7 +389,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = createUsersWithListInputValidateBeforeCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -363,12 +397,6 @@ public class UserApi {
private com.squareup.okhttp.Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)");
}
// create path and map variables
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
@@ -405,6 +433,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call deleteUserValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling deleteUser(Async)");
}
com.squareup.okhttp.Call call = deleteUserCall(username, progressListener, progressRequestListener);
return call;
}
/**
@@ -425,7 +470,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> deleteUserWithHttpInfo(String username) throws ApiException {
com.squareup.okhttp.Call call = deleteUserCall(username, null, null);
com.squareup.okhttp.Call call = deleteUserValidateBeforeCall(username, null, null);
return apiClient.execute(call);
}
@@ -458,7 +503,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = deleteUserCall(username, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = deleteUserValidateBeforeCall(username, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -466,12 +511,6 @@ public class UserApi {
private com.squareup.okhttp.Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)");
}
// create path and map variables
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
@@ -508,6 +547,23 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call getUserByNameValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling getUserByName(Async)");
}
com.squareup.okhttp.Call call = getUserByNameCall(username, progressListener, progressRequestListener);
return call;
}
/**
@@ -530,7 +586,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<User> getUserByNameWithHttpInfo(String username) throws ApiException {
com.squareup.okhttp.Call call = getUserByNameCall(username, null, null);
com.squareup.okhttp.Call call = getUserByNameValidateBeforeCall(username, null, null);
Type localVarReturnType = new TypeToken<User>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -564,7 +620,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = getUserByNameCall(username, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = getUserByNameValidateBeforeCall(username, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<User>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -573,17 +629,6 @@ public class UserApi {
private com.squareup.okhttp.Call loginUserCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)");
}
// verify the required parameter 'password' is set
if (password == null) {
throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)");
}
// create path and map variables
String localVarPath = "/user/login".replaceAll("\\{format\\}","json");
@@ -623,6 +668,28 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call loginUserValidateBeforeCall(String username, String password, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling loginUser(Async)");
}
// verify the required parameter 'password' is set
if (password == null) {
throw new ApiException("Missing the required parameter 'password' when calling loginUser(Async)");
}
com.squareup.okhttp.Call call = loginUserCall(username, password, progressListener, progressRequestListener);
return call;
}
/**
@@ -647,7 +714,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<String> loginUserWithHttpInfo(String username, String password) throws ApiException {
com.squareup.okhttp.Call call = loginUserCall(username, password, null, null);
com.squareup.okhttp.Call call = loginUserValidateBeforeCall(username, password, null, null);
Type localVarReturnType = new TypeToken<String>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -682,7 +749,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = loginUserCall(username, password, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = loginUserValidateBeforeCall(username, password, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<String>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
@@ -691,7 +758,6 @@ public class UserApi {
private com.squareup.okhttp.Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/user/logout".replaceAll("\\{format\\}","json");
@@ -727,6 +793,18 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call logoutUserValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
com.squareup.okhttp.Call call = logoutUserCall(progressListener, progressRequestListener);
return call;
}
/**
@@ -745,7 +823,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> logoutUserWithHttpInfo() throws ApiException {
com.squareup.okhttp.Call call = logoutUserCall(null, null);
com.squareup.okhttp.Call call = logoutUserValidateBeforeCall(null, null);
return apiClient.execute(call);
}
@@ -777,7 +855,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = logoutUserCall(progressListener, progressRequestListener);
com.squareup.okhttp.Call call = logoutUserValidateBeforeCall(progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
@@ -785,17 +863,6 @@ public class UserApi {
private com.squareup.okhttp.Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling updateUser(Async)");
}
// create path and map variables
String localVarPath = "/user/{username}".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString()));
@@ -832,6 +899,28 @@ public class UserApi {
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
private com.squareup.okhttp.Call updateUserValidateBeforeCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'username' is set
if (username == null) {
throw new ApiException("Missing the required parameter 'username' when calling updateUser(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling updateUser(Async)");
}
com.squareup.okhttp.Call call = updateUserCall(username, body, progressListener, progressRequestListener);
return call;
}
/**
@@ -854,7 +943,7 @@ public class UserApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> updateUserWithHttpInfo(String username, User body) throws ApiException {
com.squareup.okhttp.Call call = updateUserCall(username, body, null, null);
com.squareup.okhttp.Call call = updateUserValidateBeforeCall(username, body, null, null);
return apiClient.execute(call);
}
@@ -888,7 +977,7 @@ public class UserApi {
};
}
com.squareup.okhttp.Call call = updateUserCall(username, body, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = updateUserValidateBeforeCall(username, body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -18,7 +18,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -18,7 +18,7 @@ import io.swagger.client.Pair;
import java.util.Map;
import java.util.List;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class OAuth implements Authentication {
private String accessToken;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -19,9 +19,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Category
* A category for a pet
*/
@ApiModel(description = "A category for a pet")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class Category {
@SerializedName("id")
private Long id = null;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -19,9 +19,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* ModelApiResponse
* Describes the result of uploading an image resource
*/
@ApiModel(description = "Describes the result of uploading an image resource")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class ModelApiResponse {
@SerializedName("code")
private Integer code = null;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -20,9 +20,10 @@ import io.swagger.annotations.ApiModelProperty;
import org.joda.time.DateTime;
/**
* Order
* An order for a pets from the pet store
*/
@ApiModel(description = "An order for a pets from the pet store")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class Order {
@SerializedName("id")
private Long id = null;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -23,9 +23,10 @@ import java.util.ArrayList;
import java.util.List;
/**
* Pet
* A pet for sale in the pet store
*/
@ApiModel(description = "A pet for sale in the pet store")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class Pet {
@SerializedName("id")
private Long id = null;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -19,9 +19,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* Tag
* A tag for a pet
*/
@ApiModel(description = "A tag for a pet")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class Tag {
@SerializedName("id")
private Long id = null;

View File

@@ -1,6 +1,6 @@
/*
* Swagger Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
* This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.
*
* OpenAPI spec version: 1.0.0
* Contact: apiteam@swagger.io
@@ -19,9 +19,10 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
/**
* User
* A User who is purchasing from the pet store
*/
@ApiModel(description = "A User who is purchasing from the pet store")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-11-12T23:31:10.007+01:00")
public class User {
@SerializedName("id")
private Long id = null;