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

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

View File

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

View File

@@ -53,7 +53,7 @@ null (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -97,7 +97,7 @@ null (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -141,7 +141,7 @@ null (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -185,7 +185,7 @@ null (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -230,7 +230,7 @@ Name | Type | Description | Notes
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -277,7 +277,7 @@ Name | Type | Description | Notes
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -317,7 +317,7 @@ null (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/xml, application/json
@@ -363,7 +363,7 @@ null (empty response body)
No authorization required
### HTTP reuqest headers
### HTTP request headers
- **Content-Type**: Not defined
- **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.model.Pet;
import io.swagger.client.model.ModelApiResponse;
import java.io.File;
import io.swagger.client.model.ApiResponse;
import java.util.ArrayList;
import java.util.HashMap;
@@ -339,10 +339,10 @@ if (status != null)
* @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
* @return ModelApiResponse
* @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;
// verify the required parameter 'petId' is set
@@ -378,7 +378,7 @@ if (file != null)
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);
}
}

View File

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