Merge branch 'master' into java-docs

Conflicts:
	modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/JavaClientCodegen.java
	samples/client/petstore/java/default/pom.xml
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Animal.java
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Cat.java
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Dog.java
	samples/client/petstore/java/default/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/jersey2/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Cat.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Dog.java
	samples/client/petstore/java/okhttp-gson/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/StringUtil.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Model200Response.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/ModelReturn.java
	samples/client/petstore/java/retrofit/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/StringUtil.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Model200Response.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/ModelReturn.java
	samples/client/petstore/java/retrofit2/src/main/java/io/swagger/client/model/Name.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/StringUtil.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Model200Response.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/ModelReturn.java
	samples/client/petstore/java/retrofit2rx/src/main/java/io/swagger/client/model/Name.java
This commit is contained in:
xhh
2016-04-19 20:19:10 +08:00
1173 changed files with 38550 additions and 26332 deletions

View File

@@ -3,7 +3,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-03-14T22:17:51.831+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:59.477+08:00")
public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:59.477+08:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:59.477+08:00")
public class Pair {
private String name = "";
private String value = "";

View File

@@ -1,6 +1,6 @@
package io.swagger.client;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-03-14T22:17:51.831+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:59.477+08:00")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).

View File

@@ -18,8 +18,8 @@ import com.squareup.okhttp.Response;
import java.io.IOException;
import io.swagger.client.model.Pet;
import io.swagger.client.model.InlineResponse200;
import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -46,11 +46,15 @@ public class PetApi {
this.apiClient = apiClient;
}
/* Build call for addPet */
private 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");
@@ -62,7 +66,7 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -92,7 +96,7 @@ public class PetApi {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void addPet(Pet body) throws ApiException {
@@ -102,7 +106,7 @@ public class PetApi {
/**
* Add a new pet to the store
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -114,7 +118,7 @@ public class PetApi {
/**
* Add a new pet to the store (asynchronously)
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -144,105 +148,6 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for addPetUsingByteArray */
private Call addPetUsingByteArrayCall(byte[] body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/pet?testing_byte_array=true".replaceAll("\\{format\\}","json");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
"application/json", "application/xml"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
* @param body Pet object in the form of byte array (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void addPetUsingByteArray(byte[] body) throws ApiException {
addPetUsingByteArrayWithHttpInfo(body);
}
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
*
* @param body Pet object in the form of byte array (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> addPetUsingByteArrayWithHttpInfo(byte[] body) throws ApiException {
Call call = addPetUsingByteArrayCall(body, null, null);
return apiClient.execute(call);
}
/**
* Fake endpoint to test byte array in body parameter for adding a new pet to the store (asynchronously)
*
* @param body Pet object in the form of byte array (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call addPetUsingByteArrayAsync(byte[] body, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
Call call = addPetUsingByteArrayCall(body, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for deletePet */
private Call deletePetCall(Long petId, String apiKey, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -266,7 +171,7 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -351,25 +256,29 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for findPetsByStatus */
private 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");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
if (status != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "status", status));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "status", status));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -399,7 +308,7 @@ public class PetApi {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for query (optional, default to available)
* @param status Status values that need to be considered for filter (required)
* @return List<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -411,7 +320,7 @@ public class PetApi {
/**
* Finds Pets by status
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for query (optional, default to available)
* @param status Status values that need to be considered for filter (required)
* @return ApiResponse<List<Pet>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -424,7 +333,7 @@ public class PetApi {
/**
* Finds Pets by status (asynchronously)
* Multiple status values can be provided with comma separated strings
* @param status Status values that need to be considered for query (optional, default to available)
* @param status Status values that need to be considered for filter (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -455,25 +364,29 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for findPetsByTags */
private 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");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
if (tags != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "tags", tags));
localVarQueryParams.addAll(apiClient.parameterToPairs("csv", "tags", tags));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -502,8 +415,8 @@ public class PetApi {
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (optional)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return List<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -514,8 +427,8 @@ public class PetApi {
/**
* Finds Pets by tags
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (optional)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @return ApiResponse<List<Pet>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -527,8 +440,8 @@ public class PetApi {
/**
* Finds Pets by tags (asynchronously)
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (optional)
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
* @param tags Tags to filter by (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -559,7 +472,6 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getPetById */
private Call getPetByIdCall(Long petId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -581,7 +493,7 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -604,14 +516,14 @@ public class PetApi {
});
}
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* Returns a single pet
* @param petId ID of pet to return (required)
* @return Pet
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -622,8 +534,8 @@ public class PetApi {
/**
* Find pet by ID
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* Returns a single pet
* @param petId ID of pet to return (required)
* @return ApiResponse<Pet>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -635,8 +547,8 @@ public class PetApi {
/**
* Find pet by ID (asynchronously)
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* Returns a single pet
* @param petId ID of pet to return (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -667,227 +579,15 @@ public class PetApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getPetByIdInObject */
private Call getPetByIdInObjectCall(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 getPetByIdInObject(Async)");
}
// create path and map variables
String localVarPath = "/pet/{petId}?response=inline_arbitrary_object".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return InlineResponse200
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public InlineResponse200 getPetByIdInObject(Long petId) throws ApiException {
ApiResponse<InlineResponse200> resp = getPetByIdInObjectWithHttpInfo(petId);
return resp.getData();
}
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return ApiResponse<InlineResponse200>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<InlineResponse200> getPetByIdInObjectWithHttpInfo(Long petId) throws ApiException {
Call call = getPetByIdInObjectCall(petId, null, null);
Type localVarReturnType = new TypeToken<InlineResponse200>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Fake endpoint to test inline arbitrary object return by &#39;Find pet by ID&#39; (asynchronously)
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call getPetByIdInObjectAsync(Long petId, final ApiCallback<InlineResponse200> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
Call call = getPetByIdInObjectCall(petId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<InlineResponse200>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for petPetIdtestingByteArraytrueGet */
private Call petPetIdtestingByteArraytrueGetCall(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 petPetIdtestingByteArraytrueGet(Async)");
}
// create path and map variables
String localVarPath = "/pet/{petId}?testing_byte_array=true".replaceAll("\\{format\\}","json")
.replaceAll("\\{" + "petId" + "\\}", apiClient.escapeString(petId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "petstore_auth", "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return byte[]
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public byte[] petPetIdtestingByteArraytrueGet(Long petId) throws ApiException {
ApiResponse<byte[]> resp = petPetIdtestingByteArraytrueGetWithHttpInfo(petId);
return resp.getData();
}
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39;
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @return ApiResponse<byte[]>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<byte[]> petPetIdtestingByteArraytrueGetWithHttpInfo(Long petId) throws ApiException {
Call call = petPetIdtestingByteArraytrueGetCall(petId, null, null);
Type localVarReturnType = new TypeToken<byte[]>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Fake endpoint to test byte array return by &#39;Find pet by ID&#39; (asynchronously)
* Returns a pet when ID &lt; 10. ID &gt; 10 or nonintegers will simulate API error conditions
* @param petId ID of pet that needs to be fetched (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call petPetIdtestingByteArraytrueGetAsync(Long petId, final ApiCallback<byte[]> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
Call call = petPetIdtestingByteArraytrueGetCall(petId, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<byte[]>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for updatePet */
private 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");
@@ -899,7 +599,7 @@ public class PetApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -929,7 +629,7 @@ public class PetApi {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void updatePet(Pet body) throws ApiException {
@@ -939,7 +639,7 @@ public class PetApi {
/**
* Update an existing pet
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -951,7 +651,7 @@ public class PetApi {
/**
* Update an existing pet (asynchronously)
*
* @param body Pet object that needs to be added to the store (optional)
* @param body Pet object that needs to be added to the store (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -981,9 +681,8 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for updatePetWithForm */
private Call updatePetWithFormCall(String petId, String name, String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
private 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
@@ -1007,7 +706,7 @@ public class PetApi {
localVarFormParams.put("status", status);
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -1042,7 +741,7 @@ public class PetApi {
* @param status Updated status of the pet (optional)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void updatePetWithForm(String petId, String name, String status) throws ApiException {
public void updatePetWithForm(Long petId, String name, String status) throws ApiException {
updatePetWithFormWithHttpInfo(petId, name, status);
}
@@ -1055,7 +754,7 @@ public class PetApi {
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> updatePetWithFormWithHttpInfo(String petId, String name, String status) throws ApiException {
public ApiResponse<Void> updatePetWithFormWithHttpInfo(Long petId, String name, String status) throws ApiException {
Call call = updatePetWithFormCall(petId, name, status, null, null);
return apiClient.execute(call);
}
@@ -1070,7 +769,7 @@ public class PetApi {
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call updatePetWithFormAsync(String petId, String name, String status, final ApiCallback<Void> callback) throws ApiException {
public Call updatePetWithFormAsync(Long petId, String name, String status, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -1095,7 +794,6 @@ public class PetApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for uploadFile */
private Call uploadFileCall(Long petId, String additionalMetadata, File file, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -1121,7 +819,7 @@ public class PetApi {
localVarFormParams.put("file", file);
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -1154,10 +852,12 @@ public class PetApi {
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ApiResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
uploadFileWithHttpInfo(petId, additionalMetadata, file);
public ApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
ApiResponse<ApiResponse> resp = uploadFileWithHttpInfo(petId, additionalMetadata, file);
return resp.getData();
}
/**
@@ -1166,12 +866,13 @@ public class PetApi {
* @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional)
* @return ApiResponse<Void>
* @return ApiResponse<ApiResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Void> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
public ApiResponse<ApiResponse> uploadFileWithHttpInfo(Long petId, String additionalMetadata, File file) throws ApiException {
Call call = uploadFileCall(petId, additionalMetadata, file, null, null);
return apiClient.execute(call);
Type localVarReturnType = new TypeToken<ApiResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
@@ -1184,7 +885,7 @@ public class PetApi {
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback<Void> callback) throws ApiException {
public Call uploadFileAsync(Long petId, String additionalMetadata, File file, final ApiCallback<ApiResponse> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -1206,8 +907,8 @@ public class PetApi {
}
Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback);
Type localVarReturnType = new TypeToken<ApiResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}

View File

@@ -44,7 +44,6 @@ public class StoreApi {
this.apiClient = apiClient;
}
/* Build call for deleteOrder */
private Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -66,7 +65,7 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -148,111 +147,6 @@ public class StoreApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for findOrdersByStatus */
private Call findOrdersByStatusCall(String status, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/store/findByStatus".replaceAll("\\{format\\}","json");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
if (status != null)
localVarQueryParams.addAll(apiClient.parameterToPairs("", "status", status));
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Finds orders by status
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query (optional, default to placed)
* @return List<Order>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public List<Order> findOrdersByStatus(String status) throws ApiException {
ApiResponse<List<Order>> resp = findOrdersByStatusWithHttpInfo(status);
return resp.getData();
}
/**
* Finds orders by status
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query (optional, default to placed)
* @return ApiResponse<List<Order>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<List<Order>> findOrdersByStatusWithHttpInfo(String status) throws ApiException {
Call call = findOrdersByStatusCall(status, null, null);
Type localVarReturnType = new TypeToken<List<Order>>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Finds orders by status (asynchronously)
* A single status value can be provided as a string
* @param status Status value that needs to be considered for query (optional, default to placed)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call findOrdersByStatusAsync(String status, final ApiCallback<List<Order>> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
Call call = findOrdersByStatusCall(status, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<List<Order>>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getInventory */
private Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -268,7 +162,7 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -351,108 +245,8 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getInventoryInObject */
private Call getInventoryInObjectCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/store/inventory?response=arbitrary_object".replaceAll("\\{format\\}","json");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
if(progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build();
}
});
}
String[] localVarAuthNames = new String[] { "api_key" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public Object getInventoryInObject() throws ApiException {
ApiResponse<Object> resp = getInventoryInObjectWithHttpInfo();
return resp.getData();
}
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39;
* Returns an arbitrary object which is actually a map of status codes to quantities
* @return ApiResponse<Object>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Object> getInventoryInObjectWithHttpInfo() throws ApiException {
Call call = getInventoryInObjectCall(null, null);
Type localVarReturnType = new TypeToken<Object>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
* Fake endpoint to test arbitrary object return by &#39;Get inventory&#39; (asynchronously)
* Returns an arbitrary object which is actually a map of status codes to quantities
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call getInventoryInObjectAsync(final ApiCallback<Object> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
if (callback != null) {
progressListener = new ProgressResponseBody.ProgressListener() {
@Override
public void update(long bytesRead, long contentLength, boolean done) {
callback.onDownloadProgress(bytesRead, contentLength, done);
}
};
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
@Override
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
callback.onUploadProgress(bytesWritten, contentLength, done);
}
};
}
Call call = getInventoryInObjectCall(progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<Object>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for getOrderById */
private Call getOrderByIdCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
private Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'orderId' is set
@@ -472,7 +266,7 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -495,30 +289,30 @@ public class StoreApi {
});
}
String[] localVarAuthNames = new String[] { "test_api_key_query", "test_api_key_header" };
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return Order
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public Order getOrderById(String orderId) throws ApiException {
public Order getOrderById(Long orderId) throws ApiException {
ApiResponse<Order> resp = getOrderByIdWithHttpInfo(orderId);
return resp.getData();
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @return ApiResponse<Order>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<Order> getOrderByIdWithHttpInfo(String orderId) throws ApiException {
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
Call call = getOrderByIdCall(orderId, null, null);
Type localVarReturnType = new TypeToken<Order>(){}.getType();
return apiClient.execute(call, localVarReturnType);
@@ -526,13 +320,13 @@ public class StoreApi {
/**
* Find purchase order by ID (asynchronously)
* For valid response try integer IDs with value &lt;= 5 or &gt; 10. Other values will generated exceptions
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions
* @param orderId ID of pet that needs to be fetched (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
public Call getOrderByIdAsync(String orderId, final ApiCallback<Order> callback) throws ApiException {
public Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -558,11 +352,15 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for placeOrder */
private 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");
@@ -574,7 +372,7 @@ public class StoreApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -597,14 +395,14 @@ public class StoreApi {
});
}
String[] localVarAuthNames = new String[] { "test_api_client_id", "test_api_client_secret" };
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (optional)
* @param body order placed for purchasing the pet (required)
* @return Order
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -616,7 +414,7 @@ public class StoreApi {
/**
* Place an order for a pet
*
* @param body order placed for purchasing the pet (optional)
* @param body order placed for purchasing the pet (required)
* @return ApiResponse<Order>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -629,7 +427,7 @@ public class StoreApi {
/**
* Place an order for a pet (asynchronously)
*
* @param body order placed for purchasing the pet (optional)
* @param body order placed for purchasing the pet (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -660,5 +458,4 @@ public class StoreApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
}

View File

@@ -44,11 +44,15 @@ public class UserApi {
this.apiClient = apiClient;
}
/* Build call for createUser */
private 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");
@@ -60,7 +64,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -90,7 +94,7 @@ public class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (optional)
* @param body Created user object (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void createUser(User body) throws ApiException {
@@ -100,7 +104,7 @@ public class UserApi {
/**
* Create user
* This can only be done by the logged in user.
* @param body Created user object (optional)
* @param body Created user object (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -112,7 +116,7 @@ public class UserApi {
/**
* Create user (asynchronously)
* This can only be done by the logged in user.
* @param body Created user object (optional)
* @param body Created user object (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -142,11 +146,15 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for createUsersWithArrayInput */
private 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");
@@ -158,7 +166,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -188,7 +196,7 @@ public class UserApi {
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void createUsersWithArrayInput(List<User> body) throws ApiException {
@@ -198,7 +206,7 @@ public class UserApi {
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -210,7 +218,7 @@ public class UserApi {
/**
* Creates list of users with given input array (asynchronously)
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -240,11 +248,15 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for createUsersWithListInput */
private 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");
@@ -256,7 +268,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -286,7 +298,7 @@ public class UserApi {
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void createUsersWithListInput(List<User> body) throws ApiException {
@@ -296,7 +308,7 @@ public class UserApi {
/**
* Creates list of users with given input array
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -308,7 +320,7 @@ public class UserApi {
/**
* Creates list of users with given input array (asynchronously)
*
* @param body List of user object (optional)
* @param body List of user object (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -338,7 +350,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for deleteUser */
private Call deleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -360,7 +371,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -383,7 +394,7 @@ public class UserApi {
});
}
String[] localVarAuthNames = new String[] { "test_http_basic" };
String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -442,7 +453,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for getUserByName */
private Call getUserByNameCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -464,7 +474,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -494,7 +504,7 @@ public class UserApi {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -506,7 +516,7 @@ public class UserApi {
/**
* Get user by user name
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @return ApiResponse<User>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -519,7 +529,7 @@ public class UserApi {
/**
* Get user by user name (asynchronously)
*
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param username The name that needs to be fetched. Use user1 for testing. (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -550,11 +560,20 @@ public class UserApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for loginUser */
private 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");
@@ -570,7 +589,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -600,8 +619,8 @@ public class UserApi {
/**
* Logs user into the system
*
* @param username The user name for login (optional)
* @param password The password for login in clear text (optional)
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return String
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -613,8 +632,8 @@ public class UserApi {
/**
* Logs user into the system
*
* @param username The user name for login (optional)
* @param password The password for login in clear text (optional)
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @return ApiResponse<String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -627,8 +646,8 @@ public class UserApi {
/**
* Logs user into the system (asynchronously)
*
* @param username The user name for login (optional)
* @param password The password for login in clear text (optional)
* @param username The user name for login (required)
* @param password The password for login in clear text (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -659,7 +678,6 @@ public class UserApi {
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
/* Build call for logoutUser */
private Call logoutUserCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
@@ -675,7 +693,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -754,7 +772,6 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
/* Build call for updateUser */
private Call updateUserCall(String username, User body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
@@ -764,6 +781,11 @@ public class UserApi {
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")
@@ -776,7 +798,7 @@ public class UserApi {
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json", "application/xml"
"application/xml", "application/json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
@@ -807,7 +829,7 @@ public class UserApi {
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param body Updated user object (optional)
* @param body Updated user object (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public void updateUser(String username, User body) throws ApiException {
@@ -818,7 +840,7 @@ public class UserApi {
* Updated user
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param body Updated user object (optional)
* @param body Updated user object (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -831,7 +853,7 @@ public class UserApi {
* Updated user (asynchronously)
* This can only be done by the logged in user.
* @param username name that need to be deleted (required)
* @param body Updated user object (optional)
* @param body Updated user object (required)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -861,5 +883,4 @@ public class UserApi {
apiClient.executeAsync(call, callback);
return call;
}
}

View File

@@ -5,7 +5,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-03-14T22:17:51.831+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:59.477+08:00")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;

View File

@@ -5,7 +5,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-03-14T22:17:51.831+08:00")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:59.477+08:00")
public class OAuth implements Authentication {
private String accessToken;

View File

@@ -14,9 +14,7 @@ public class Animal {
@SerializedName("className")
private String className = null;
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -27,7 +25,6 @@ public class Animal {
this.className = className;
}
@Override
public boolean equals(Object o) {

View File

@@ -0,0 +1,96 @@
package io.swagger.client.model;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.google.gson.annotations.SerializedName;
public class ApiResponse {
@SerializedName("code")
private Integer code = null;
@SerializedName("type")
private String type = null;
@SerializedName("message")
private String message = null;
/**
**/
@ApiModelProperty(value = "")
public Integer getCode() {
return code;
}
public void setCode(Integer code) {
this.code = code;
}
/**
**/
@ApiModelProperty(value = "")
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
/**
**/
@ApiModelProperty(value = "")
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ApiResponse apiResponse = (ApiResponse) o;
return Objects.equals(this.code, apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) &&
Objects.equals(this.message, apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -15,12 +15,10 @@ public class Cat extends Animal {
@SerializedName("className")
private String className = null;
@SerializedName("declawed")
private Boolean declawed = null;
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -31,7 +29,6 @@ public class Cat extends Animal {
this.className = className;
}
/**
**/
@ApiModelProperty(value = "")
@@ -42,7 +39,6 @@ public class Cat extends Animal {
this.declawed = declawed;
}
@Override
public boolean equals(Object o) {

View File

@@ -14,12 +14,10 @@ public class Category {
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
/**
**/
@ApiModelProperty(value = "")
@@ -30,7 +28,6 @@ public class Category {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@@ -41,7 +38,6 @@ public class Category {
this.name = name;
}
@Override
public boolean equals(Object o) {

View File

@@ -15,12 +15,10 @@ public class Dog extends Animal {
@SerializedName("className")
private String className = null;
@SerializedName("breed")
private String breed = null;
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -31,7 +29,6 @@ public class Dog extends Animal {
this.className = className;
}
/**
**/
@ApiModelProperty(value = "")
@@ -42,7 +39,6 @@ public class Dog extends Animal {
this.breed = breed;
}
@Override
public boolean equals(Object o) {

View File

@@ -0,0 +1,233 @@
package io.swagger.client.model;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.util.Date;
import com.google.gson.annotations.SerializedName;
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 boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.string, formatTest.string) &&
Objects.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.password, formatTest.password);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, string, _byte, binary, date, dateTime, password);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -1,176 +0,0 @@
package io.swagger.client.model;
import java.util.Objects;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.client.model.Tag;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.annotations.SerializedName;
public class InlineResponse200 {
@SerializedName("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@SerializedName("name")
private String name = null;
@SerializedName("id")
private Long id = null;
@SerializedName("category")
private Object category = null;
@SerializedName("tags")
private List<Tag> tags = new ArrayList<Tag>();
public enum StatusEnum {
@SerializedName("available")
AVAILABLE("available"),
@SerializedName("pending")
PENDING("pending"),
@SerializedName("sold")
SOLD("sold");
private String value;
StatusEnum(String value) {
this.value = value;
}
@Override
public String toString() {
return value;
}
}
@SerializedName("status")
private StatusEnum status = null;
/**
**/
@ApiModelProperty(value = "")
public List<String> getPhotoUrls() {
return photoUrls;
}
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
/**
**/
@ApiModelProperty(value = "")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
**/
@ApiModelProperty(required = true, value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
public Object getCategory() {
return category;
}
public void setCategory(Object category) {
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
**/
@ApiModelProperty(value = "pet status in the store")
public StatusEnum getStatus() {
return status;
}
public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
InlineResponse200 inlineResponse200 = (InlineResponse200) o;
return Objects.equals(this.photoUrls, inlineResponse200.photoUrls) &&
Objects.equals(this.name, inlineResponse200.name) &&
Objects.equals(this.id, inlineResponse200.id) &&
Objects.equals(this.category, inlineResponse200.category) &&
Objects.equals(this.tags, inlineResponse200.tags) &&
Objects.equals(this.status, inlineResponse200.status);
}
@Override
public int hashCode() {
return Objects.hash(photoUrls, name, id, category, tags, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class InlineResponse200 {\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -9,14 +9,15 @@ import com.google.gson.annotations.SerializedName;
/**
* 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 = "")
@@ -27,7 +28,6 @@ public class Model200Response {
this.name = name;
}
@Override
public boolean equals(Object o) {

View File

@@ -9,14 +9,15 @@ import com.google.gson.annotations.SerializedName;
/**
* Model for testing reserved words
**/
@ApiModel(description = "Model for testing reserved words")
public class ModelReturn {
@SerializedName("return")
private Integer _return = null;
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +28,6 @@ public class ModelReturn {
this._return = _return;
}
@Override
public boolean equals(Object o) {

View File

@@ -9,20 +9,21 @@ import com.google.gson.annotations.SerializedName;
/**
* 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")
private Integer name = null;
@SerializedName("snake_case")
private Integer snakeCase = null;
/**
**/
@ApiModelProperty(value = "")
@ApiModelProperty(required = true, value = "")
public Integer getName() {
return name;
}
@@ -30,18 +31,13 @@ public class Name {
this.name = name;
}
/**
**/
@ApiModelProperty(value = "")
public Integer getSnakeCase() {
return snakeCase;
}
public void setSnakeCase(Integer snakeCase) {
this.snakeCase = snakeCase;
}
@Override
public boolean equals(Object o) {

View File

@@ -15,16 +15,16 @@ public class Order {
@SerializedName("id")
private Long id = null;
@SerializedName("petId")
private Long petId = null;
@SerializedName("quantity")
private Integer quantity = null;
@SerializedName("shipDate")
private Date shipDate = null;
public enum StatusEnum {
@SerializedName("placed")
@@ -50,20 +50,20 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
@SerializedName("complete")
private Boolean complete = null;
@SerializedName("complete")
private Boolean complete = false;
/**
**/
@ApiModelProperty(value = "")
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@@ -74,7 +74,6 @@ public enum StatusEnum {
this.petId = petId;
}
/**
**/
@ApiModelProperty(value = "")
@@ -85,7 +84,6 @@ public enum StatusEnum {
this.quantity = quantity;
}
/**
**/
@ApiModelProperty(value = "")
@@ -96,7 +94,6 @@ public enum StatusEnum {
this.shipDate = shipDate;
}
/**
* Order Status
**/
@@ -108,7 +105,6 @@ public enum StatusEnum {
this.status = status;
}
/**
**/
@ApiModelProperty(value = "")
@@ -119,7 +115,6 @@ public enum StatusEnum {
this.complete = complete;
}
@Override
public boolean equals(Object o) {

View File

@@ -18,19 +18,19 @@ public class Pet {
@SerializedName("id")
private Long id = null;
@SerializedName("category")
private Category category = null;
@SerializedName("name")
private String name = null;
@SerializedName("photoUrls")
private List<String> photoUrls = new ArrayList<String>();
@SerializedName("tags")
private List<Tag> tags = new ArrayList<Tag>();
public enum StatusEnum {
@SerializedName("available")
@@ -56,9 +56,7 @@ public enum StatusEnum {
@SerializedName("status")
private StatusEnum status = null;
/**
**/
@ApiModelProperty(value = "")
@@ -69,7 +67,6 @@ public enum StatusEnum {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@@ -80,7 +77,6 @@ public enum StatusEnum {
this.category = category;
}
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -91,7 +87,6 @@ public enum StatusEnum {
this.name = name;
}
/**
**/
@ApiModelProperty(required = true, value = "")
@@ -102,7 +97,6 @@ public enum StatusEnum {
this.photoUrls = photoUrls;
}
/**
**/
@ApiModelProperty(value = "")
@@ -113,7 +107,6 @@ public enum StatusEnum {
this.tags = tags;
}
/**
* pet status in the store
**/
@@ -125,7 +118,6 @@ public enum StatusEnum {
this.status = status;
}
@Override
public boolean equals(Object o) {

View File

@@ -14,9 +14,7 @@ public class SpecialModelName {
@SerializedName("$special[property.name]")
private Long specialPropertyName = null;
/**
**/
@ApiModelProperty(value = "")
@@ -27,7 +25,6 @@ public class SpecialModelName {
this.specialPropertyName = specialPropertyName;
}
@Override
public boolean equals(Object o) {

View File

@@ -14,12 +14,10 @@ public class Tag {
@SerializedName("id")
private Long id = null;
@SerializedName("name")
private String name = null;
/**
**/
@ApiModelProperty(value = "")
@@ -30,7 +28,6 @@ public class Tag {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@@ -41,7 +38,6 @@ public class Tag {
this.name = name;
}
@Override
public boolean equals(Object o) {

View File

@@ -14,30 +14,28 @@ public class User {
@SerializedName("id")
private Long id = null;
@SerializedName("username")
private String username = null;
@SerializedName("firstName")
private String firstName = null;
@SerializedName("lastName")
private String lastName = null;
@SerializedName("email")
private String email = null;
@SerializedName("password")
private String password = null;
@SerializedName("phone")
private String phone = null;
@SerializedName("userStatus")
private Integer userStatus = null;
/**
**/
@ApiModelProperty(value = "")
@@ -48,7 +46,6 @@ public class User {
this.id = id;
}
/**
**/
@ApiModelProperty(value = "")
@@ -59,7 +56,6 @@ public class User {
this.username = username;
}
/**
**/
@ApiModelProperty(value = "")
@@ -70,7 +66,6 @@ public class User {
this.firstName = firstName;
}
/**
**/
@ApiModelProperty(value = "")
@@ -81,7 +76,6 @@ public class User {
this.lastName = lastName;
}
/**
**/
@ApiModelProperty(value = "")
@@ -92,7 +86,6 @@ public class User {
this.email = email;
}
/**
**/
@ApiModelProperty(value = "")
@@ -103,7 +96,6 @@ public class User {
this.password = password;
}
/**
**/
@ApiModelProperty(value = "")
@@ -114,7 +106,6 @@ public class User {
this.phone = phone;
}
/**
* User Status
**/
@@ -126,7 +117,6 @@ public class User {
this.userStatus = userStatus;
}
@Override
public boolean equals(Object o) {