Fix typo, regenerate Java petstore clients

This commit is contained in:
xhh 2016-04-21 18:34:00 +08:00
parent ad258a34cc
commit f8489c1fcf
25 changed files with 162 additions and 138 deletions

View File

@ -73,7 +73,7 @@ Name | Type | Description | Notes
{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}} {{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: {{#consumes}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - **Content-Type**: {{#consumes}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
- **Accept**: {{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}} - **Accept**: {{#produces}}{{mediaType}}{{#hasMore}}, {{/hasMore}}{{/produces}}{{^produces}}Not defined{{/produces}}

View File

@ -0,0 +1,12 @@
# ModelApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
**type** | **String** | | [optional]
**message** | **String** | | [optional]

View File

@ -61,7 +61,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -115,7 +115,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -168,7 +168,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -221,7 +221,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -276,7 +276,7 @@ Name | Type | Description | Notes
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -328,7 +328,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -384,14 +384,14 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="uploadFile"></a> <a name="uploadFile"></a>
# **uploadFile** # **uploadFile**
> ApiResponse uploadFile(petId, additionalMetadata, file) > ModelApiResponse uploadFile(petId, additionalMetadata, file)
uploads an image uploads an image
@ -417,7 +417,7 @@ Long petId = 789L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
File file = new File("/path/to/file.txt"); // File | file to upload File file = new File("/path/to/file.txt"); // File | file to upload
try { try {
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile"); System.err.println("Exception when calling PetApi#uploadFile");
@ -435,13 +435,13 @@ Name | Type | Description | Notes
### Return type ### Return type
[**ApiResponse**](ApiResponse.md) [**ModelApiResponse**](ModelApiResponse.md)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: multipart/form-data - **Content-Type**: multipart/form-data
- **Accept**: application/json - **Accept**: application/json

View File

@ -49,7 +49,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -100,7 +100,7 @@ This endpoint does not need any parameter.
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/json
@ -145,7 +145,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -190,7 +190,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -53,7 +53,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -97,7 +97,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -141,7 +141,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -185,7 +185,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -230,7 +230,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -277,7 +277,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -317,7 +317,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -363,7 +363,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -8,8 +8,8 @@ import io.swagger.client.Configuration;
import io.swagger.client.Pair; import io.swagger.client.Pair;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -339,10 +339,10 @@ if (status != null)
* @param petId ID of pet to update (required) * @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional) * @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional) * @param file file to upload (optional)
* @return ApiResponse * @return ModelApiResponse
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -378,7 +378,7 @@ if (file != null)
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<ApiResponse> localVarReturnType = new GenericType<ApiResponse>() {}; GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
} }
} }

View File

@ -10,7 +10,7 @@ import io.swagger.annotations.ApiModelProperty;
public class ApiResponse { public class ModelApiResponse {
private Integer code = null; private Integer code = null;
private String type = null; private String type = null;
@ -19,7 +19,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {
this.code = code; this.code = code;
return this; return this;
} }
@ -36,7 +36,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse type(String type) { public ModelApiResponse type(String type) {
this.type = type; this.type = type;
return this; return this;
} }
@ -53,7 +53,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse message(String message) { public ModelApiResponse message(String message) {
this.message = message; this.message = message;
return this; return this;
} }
@ -76,10 +76,10 @@ public class ApiResponse {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
ApiResponse apiResponse = (ApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, apiResponse.code) && return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) && Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, apiResponse.message); Objects.equals(this.message, _apiResponse.message);
} }
@Override @Override
@ -90,7 +90,7 @@ public class ApiResponse {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");

View File

@ -3,8 +3,8 @@ package io.swagger.client.api;
import io.swagger.client.ApiClient; import io.swagger.client.ApiClient;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -12,7 +12,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import feign.*; import feign.*;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-21T18:26:32.462+08:00")
public interface PetApi extends ApiClient.Api { public interface PetApi extends ApiClient.Api {
@ -117,12 +117,12 @@ public interface PetApi extends ApiClient.Api {
* @param petId ID of pet to update (required) * @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional) * @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional) * @param file file to upload (optional)
* @return ApiResponse * @return ModelApiResponse
*/ */
@RequestLine("POST /pet/{petId}/uploadImage") @RequestLine("POST /pet/{petId}/uploadImage")
@Headers({ @Headers({
"Content-type: multipart/form-data", "Content-type: multipart/form-data",
"Accepts: application/json", "Accepts: application/json",
}) })
ApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file); ModelApiResponse uploadFile(@Param("petId") Long petId, @Param("additionalMetadata") String additionalMetadata, @Param("file") File file);
} }

View File

@ -9,8 +9,8 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:57.731+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-21T18:26:32.462+08:00")
public class ApiResponse { public class ModelApiResponse {
private Integer code = null; private Integer code = null;
private String type = null; private String type = null;
@ -19,7 +19,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {
this.code = code; this.code = code;
return this; return this;
} }
@ -36,7 +36,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse type(String type) { public ModelApiResponse type(String type) {
this.type = type; this.type = type;
return this; return this;
} }
@ -53,7 +53,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse message(String message) { public ModelApiResponse message(String message) {
this.message = message; this.message = message;
return this; return this;
} }
@ -76,10 +76,10 @@ public class ApiResponse {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
ApiResponse apiResponse = (ApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, apiResponse.code) && return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) && Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, apiResponse.message); Objects.equals(this.message, _apiResponse.message);
} }
@Override @Override
@ -90,7 +90,7 @@ public class ApiResponse {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");

View File

@ -0,0 +1,12 @@
# ModelApiResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **Integer** | | [optional]
**type** | **String** | | [optional]
**message** | **String** | | [optional]

View File

@ -61,7 +61,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -115,7 +115,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -168,7 +168,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -221,7 +221,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -276,7 +276,7 @@ Name | Type | Description | Notes
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -328,7 +328,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -384,14 +384,14 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
<a name="uploadFile"></a> <a name="uploadFile"></a>
# **uploadFile** # **uploadFile**
> ApiResponse uploadFile(petId, additionalMetadata, file) > ModelApiResponse uploadFile(petId, additionalMetadata, file)
uploads an image uploads an image
@ -417,7 +417,7 @@ Long petId = 789L; // Long | ID of pet to update
String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server String additionalMetadata = "additionalMetadata_example"; // String | Additional data to pass to server
File file = new File("/path/to/file.txt"); // File | file to upload File file = new File("/path/to/file.txt"); // File | file to upload
try { try {
ApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file); ModelApiResponse result = apiInstance.uploadFile(petId, additionalMetadata, file);
System.out.println(result); System.out.println(result);
} catch (ApiException e) { } catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFile"); System.err.println("Exception when calling PetApi#uploadFile");
@ -435,13 +435,13 @@ Name | Type | Description | Notes
### Return type ### Return type
[**ApiResponse**](ApiResponse.md) [**ModelApiResponse**](ModelApiResponse.md)
### Authorization ### Authorization
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: multipart/form-data - **Content-Type**: multipart/form-data
- **Accept**: application/json - **Accept**: application/json

View File

@ -49,7 +49,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -100,7 +100,7 @@ This endpoint does not need any parameter.
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/json
@ -145,7 +145,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -190,7 +190,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -53,7 +53,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -97,7 +97,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -141,7 +141,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -185,7 +185,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -230,7 +230,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -277,7 +277,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -317,7 +317,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -363,7 +363,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -8,15 +8,15 @@ import io.swagger.client.Pair;
import javax.ws.rs.core.GenericType; import javax.ws.rs.core.GenericType;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-21T18:26:21.396+08:00")
public class PetApi { public class PetApi {
private ApiClient apiClient; private ApiClient apiClient;
@ -339,10 +339,10 @@ if (status != null)
* @param petId ID of pet to update (required) * @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional) * @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional) * @param file file to upload (optional)
* @return ApiResponse * @return ModelApiResponse
* @throws ApiException if fails to make API call * @throws ApiException if fails to make API call
*/ */
public ApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException { public ModelApiResponse uploadFile(Long petId, String additionalMetadata, File file) throws ApiException {
Object localVarPostBody = null; Object localVarPostBody = null;
// verify the required parameter 'petId' is set // verify the required parameter 'petId' is set
@ -378,7 +378,7 @@ if (file != null)
String[] localVarAuthNames = new String[] { "petstore_auth" }; String[] localVarAuthNames = new String[] { "petstore_auth" };
GenericType<ApiResponse> localVarReturnType = new GenericType<ApiResponse>() {}; GenericType<ModelApiResponse> localVarReturnType = new GenericType<ModelApiResponse>() {};
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
} }
} }

View File

@ -9,8 +9,8 @@ import io.swagger.annotations.ApiModelProperty;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-19T19:29:55.995+08:00") @javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-04-21T18:26:21.396+08:00")
public class ApiResponse { public class ModelApiResponse {
private Integer code = null; private Integer code = null;
private String type = null; private String type = null;
@ -19,7 +19,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse code(Integer code) { public ModelApiResponse code(Integer code) {
this.code = code; this.code = code;
return this; return this;
} }
@ -36,7 +36,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse type(String type) { public ModelApiResponse type(String type) {
this.type = type; this.type = type;
return this; return this;
} }
@ -53,7 +53,7 @@ public class ApiResponse {
/** /**
**/ **/
public ApiResponse message(String message) { public ModelApiResponse message(String message) {
this.message = message; this.message = message;
return this; return this;
} }
@ -76,10 +76,10 @@ public class ApiResponse {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
ApiResponse apiResponse = (ApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, apiResponse.code) && return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, apiResponse.type) && Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, apiResponse.message); Objects.equals(this.message, _apiResponse.message);
} }
@Override @Override
@ -90,7 +90,7 @@ public class ApiResponse {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");

View File

@ -61,7 +61,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -115,7 +115,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -168,7 +168,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -221,7 +221,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -276,7 +276,7 @@ Name | Type | Description | Notes
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -328,7 +328,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/json, application/xml - **Content-Type**: application/json, application/xml
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -384,7 +384,7 @@ null (empty response body)
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: application/x-www-form-urlencoded - **Content-Type**: application/x-www-form-urlencoded
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -441,7 +441,7 @@ Name | Type | Description | Notes
[petstore_auth](../README.md#petstore_auth) [petstore_auth](../README.md#petstore_auth)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: multipart/form-data - **Content-Type**: multipart/form-data
- **Accept**: application/json - **Accept**: application/json

View File

@ -49,7 +49,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -100,7 +100,7 @@ This endpoint does not need any parameter.
[api_key](../README.md#api_key) [api_key](../README.md#api_key)
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/json - **Accept**: application/json
@ -145,7 +145,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -190,7 +190,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -53,7 +53,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -97,7 +97,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -141,7 +141,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -185,7 +185,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -230,7 +230,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -277,7 +277,7 @@ Name | Type | Description | Notes
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -317,7 +317,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json
@ -363,7 +363,7 @@ null (empty response body)
No authorization required No authorization required
### HTTP reuqest headers ### HTTP request headers
- **Content-Type**: Not defined - **Content-Type**: Not defined
- **Accept**: application/xml, application/json - **Accept**: application/xml, application/json

View File

@ -7,8 +7,8 @@ import retrofit.http.*;
import retrofit.mime.*; import retrofit.mime.*;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -206,12 +206,12 @@ public interface PetApi {
* @param petId ID of pet to update (required) * @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional) * @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional) * @param file file to upload (optional)
* @return ApiResponse * @return ModelApiResponse
*/ */
@Multipart @Multipart
@POST("/pet/{petId}/uploadImage") @POST("/pet/{petId}/uploadImage")
ApiResponse uploadFile( ModelApiResponse uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file @Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file
); );
@ -228,6 +228,6 @@ public interface PetApi {
@Multipart @Multipart
@POST("/pet/{petId}/uploadImage") @POST("/pet/{petId}/uploadImage")
void uploadFile( void uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file, Callback<ApiResponse> cb @Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file") TypedFile file, Callback<ModelApiResponse> cb
); );
} }

View File

@ -10,7 +10,7 @@ import com.google.gson.annotations.SerializedName;
public class ApiResponse { public class ModelApiResponse {
@SerializedName("code") @SerializedName("code")
private Integer code = null; private Integer code = null;
@ -60,10 +60,10 @@ public class ApiResponse {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
ApiResponse apiResponse = (ApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(code, apiResponse.code) && return Objects.equals(code, _apiResponse.code) &&
Objects.equals(type, apiResponse.type) && Objects.equals(type, _apiResponse.type) &&
Objects.equals(message, apiResponse.message); Objects.equals(message, _apiResponse.message);
} }
@Override @Override
@ -74,7 +74,7 @@ public class ApiResponse {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");

View File

@ -9,8 +9,8 @@ import retrofit2.http.*;
import okhttp3.RequestBody; import okhttp3.RequestBody;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -112,12 +112,12 @@ public interface PetApi {
* @param petId ID of pet to update (required) * @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional) * @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional) * @param file file to upload (optional)
* @return Call<ApiResponse> * @return Call<ModelApiResponse>
*/ */
@Multipart @Multipart
@POST("pet/{petId}/uploadImage") @POST("pet/{petId}/uploadImage")
Call<ApiResponse> uploadFile( Call<ModelApiResponse> uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file @Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
); );

View File

@ -10,7 +10,7 @@ import com.google.gson.annotations.SerializedName;
public class ApiResponse { public class ModelApiResponse {
@SerializedName("code") @SerializedName("code")
private Integer code = null; private Integer code = null;
@ -60,10 +60,10 @@ public class ApiResponse {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
ApiResponse apiResponse = (ApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(code, apiResponse.code) && return Objects.equals(code, _apiResponse.code) &&
Objects.equals(type, apiResponse.type) && Objects.equals(type, _apiResponse.type) &&
Objects.equals(message, apiResponse.message); Objects.equals(message, _apiResponse.message);
} }
@Override @Override
@ -74,7 +74,7 @@ public class ApiResponse {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");

View File

@ -9,8 +9,8 @@ import retrofit2.http.*;
import okhttp3.RequestBody; import okhttp3.RequestBody;
import io.swagger.client.model.Pet; import io.swagger.client.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File; import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -112,12 +112,12 @@ public interface PetApi {
* @param petId ID of pet to update (required) * @param petId ID of pet to update (required)
* @param additionalMetadata Additional data to pass to server (optional) * @param additionalMetadata Additional data to pass to server (optional)
* @param file file to upload (optional) * @param file file to upload (optional)
* @return Call<ApiResponse> * @return Call<ModelApiResponse>
*/ */
@Multipart @Multipart
@POST("pet/{petId}/uploadImage") @POST("pet/{petId}/uploadImage")
Observable<ApiResponse> uploadFile( Observable<ModelApiResponse> uploadFile(
@Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file @Path("petId") Long petId, @Part("additionalMetadata") String additionalMetadata, @Part("file\"; filename=\"file\"") RequestBody file
); );

View File

@ -10,7 +10,7 @@ import com.google.gson.annotations.SerializedName;
public class ApiResponse { public class ModelApiResponse {
@SerializedName("code") @SerializedName("code")
private Integer code = null; private Integer code = null;
@ -60,10 +60,10 @@ public class ApiResponse {
if (o == null || getClass() != o.getClass()) { if (o == null || getClass() != o.getClass()) {
return false; return false;
} }
ApiResponse apiResponse = (ApiResponse) o; ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(code, apiResponse.code) && return Objects.equals(code, _apiResponse.code) &&
Objects.equals(type, apiResponse.type) && Objects.equals(type, _apiResponse.type) &&
Objects.equals(message, apiResponse.message); Objects.equals(message, _apiResponse.message);
} }
@Override @Override
@ -74,7 +74,7 @@ public class ApiResponse {
@Override @Override
public String toString() { public String toString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("class ApiResponse {\n"); sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n"); sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n"); sb.append(" type: ").append(toIndentedString(type)).append("\n");

View File

@ -202,7 +202,7 @@ public class PetApiTest {
api.addPet(pet).subscribe(SkeletonSubscriber.failTestOnError()); api.addPet(pet).subscribe(SkeletonSubscriber.failTestOnError());
RequestBody body = RequestBody.create(MediaType.parse("text/plain"), file); RequestBody body = RequestBody.create(MediaType.parse("text/plain"), file);
api.uploadFile(pet.getId(), "a test file", body).subscribe(new SkeletonSubscriber<ApiResponse>() { api.uploadFile(pet.getId(), "a test file", body).subscribe(new SkeletonSubscriber<ModelApiResponse>() {
@Override @Override
public void onError(Throwable e) { public void onError(Throwable e) {
// this also yields a 400 for other tests, so I guess it's okay... // this also yields a 400 for other tests, so I guess it's okay...