forked from loafle/openapi-generator-original
Fix #6166 by adding @Deprecated annotations in Java jersey2, okhttp-gson, resteasy libraries (#6801)
This commit is contained in:
parent
ab338f8cb9
commit
044bfdac39
@ -53,13 +53,16 @@ public class {{classname}} {
|
||||
{{/returnType}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
{{#allParams}}{{#required}}
|
||||
|
@ -50,13 +50,16 @@ public class {{classname}} {
|
||||
{{/returnType}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
{{#allParams}}{{#required}}
|
||||
|
@ -70,11 +70,17 @@ public class {{classname}} {
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public com.squareup.okhttp.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
|
||||
@ -123,6 +129,9 @@ public class {{classname}} {
|
||||
return {{localVariablePrefix}}apiClient.buildCall({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarCollectionQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
{{^performBeanValidation}}
|
||||
@ -163,10 +172,6 @@ public class {{classname}} {
|
||||
}
|
||||
|
||||
{{/performBeanValidation}}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -175,11 +180,17 @@ public class {{classname}} {
|
||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}{{#returnType}}
|
||||
* @return {{returnType}}{{/returnType}}
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
{{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
return {{localVariablePrefix}}resp.getData();{{/returnType}}
|
||||
@ -191,11 +202,17 @@ public class {{classname}} {
|
||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}{{/allParams}}
|
||||
* @return ApiResponse<{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
com.squareup.okhttp.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
||||
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||
@ -209,11 +226,17 @@ public class {{classname}} {
|
||||
* @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
|
||||
{{#isDeprecated}}
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public com.squareup.okhttp.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
|
@ -46,13 +46,16 @@ public class {{classname}} {
|
||||
* @return {{{returnType}}}{{/returnType}}
|
||||
* @throws ApiException if fails to make API call
|
||||
{{#isDeprecated}}
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
{{/isDeprecated}}
|
||||
{{#externalDocs}}
|
||||
* {{description}}
|
||||
* @see <a href="{{url}}">{{summary}} Documentation</a>
|
||||
{{/externalDocs}}
|
||||
*/
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}};
|
||||
{{#allParams}}{{#required}}
|
||||
|
@ -181,6 +181,18 @@ public interface FakeApi extends ApiClient.Api {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
*/
|
||||
@RequestLine("POST /fake/inline-additionalProperties")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
void testInlineAdditionalProperties(Object param);
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -395,6 +395,47 @@ if (enumQueryDouble != null)
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -185,8 +185,9 @@ public class PetApi {
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -374,6 +374,46 @@ if (enumQueryDouble != null)
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
// query params
|
||||
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 = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -168,8 +168,9 @@ public class PetApi {
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -374,6 +374,46 @@ if (enumQueryDouble != null)
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
// query params
|
||||
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 = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -168,8 +168,9 @@ public class PetApi {
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
@ -41,7 +41,7 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
||||
if (this.mapProperty == null) {
|
||||
this.mapProperty = new HashMap<String, String>();
|
||||
this.mapProperty = new HashMap<>();
|
||||
}
|
||||
this.mapProperty.put(key, mapPropertyItem);
|
||||
return this;
|
||||
@ -67,7 +67,7 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
||||
if (this.mapOfMapProperty == null) {
|
||||
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
|
||||
this.mapOfMapProperty = new HashMap<>();
|
||||
}
|
||||
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
||||
return this;
|
||||
|
@ -38,7 +38,7 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
|
||||
if (this.arrayArrayNumber == null) {
|
||||
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
|
||||
this.arrayArrayNumber = new ArrayList<>();
|
||||
}
|
||||
this.arrayArrayNumber.add(arrayArrayNumberItem);
|
||||
return this;
|
||||
|
@ -38,7 +38,7 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
|
||||
if (this.arrayNumber == null) {
|
||||
this.arrayNumber = new ArrayList<BigDecimal>();
|
||||
this.arrayNumber = new ArrayList<>();
|
||||
}
|
||||
this.arrayNumber.add(arrayNumberItem);
|
||||
return this;
|
||||
|
@ -44,7 +44,7 @@ public class ArrayTest {
|
||||
|
||||
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
|
||||
if (this.arrayOfString == null) {
|
||||
this.arrayOfString = new ArrayList<String>();
|
||||
this.arrayOfString = new ArrayList<>();
|
||||
}
|
||||
this.arrayOfString.add(arrayOfStringItem);
|
||||
return this;
|
||||
@ -70,7 +70,7 @@ public class ArrayTest {
|
||||
|
||||
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
|
||||
if (this.arrayArrayOfInteger == null) {
|
||||
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
|
||||
this.arrayArrayOfInteger = new ArrayList<>();
|
||||
}
|
||||
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
|
||||
return this;
|
||||
@ -96,7 +96,7 @@ public class ArrayTest {
|
||||
|
||||
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
|
||||
if (this.arrayArrayOfModel == null) {
|
||||
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
|
||||
this.arrayArrayOfModel = new ArrayList<>();
|
||||
}
|
||||
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
|
||||
return this;
|
||||
|
@ -128,7 +128,7 @@ public class EnumArrays {
|
||||
|
||||
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
|
||||
if (this.arrayEnum == null) {
|
||||
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
|
||||
this.arrayEnum = new ArrayList<>();
|
||||
}
|
||||
this.arrayEnum.add(arrayEnumItem);
|
||||
return this;
|
||||
|
@ -76,7 +76,7 @@ public class MapTest {
|
||||
|
||||
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
|
||||
if (this.mapMapOfString == null) {
|
||||
this.mapMapOfString = new HashMap<String, Map<String, String>>();
|
||||
this.mapMapOfString = new HashMap<>();
|
||||
}
|
||||
this.mapMapOfString.put(key, mapMapOfStringItem);
|
||||
return this;
|
||||
@ -102,7 +102,7 @@ public class MapTest {
|
||||
|
||||
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
|
||||
if (this.mapOfEnumString == null) {
|
||||
this.mapOfEnumString = new HashMap<String, InnerEnum>();
|
||||
this.mapOfEnumString = new HashMap<>();
|
||||
}
|
||||
this.mapOfEnumString.put(key, mapOfEnumStringItem);
|
||||
return this;
|
||||
|
@ -83,7 +83,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
|
||||
if (this.map == null) {
|
||||
this.map = new HashMap<String, Animal>();
|
||||
this.map = new HashMap<>();
|
||||
}
|
||||
this.map.put(key, mapItem);
|
||||
return this;
|
||||
|
@ -39,7 +39,7 @@ public class Pet {
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@JsonProperty("tags")
|
||||
private List<Tag> tags = null;
|
||||
@ -168,7 +168,7 @@ public class Pet {
|
||||
|
||||
public Pet addTagsItem(Tag tagsItem) {
|
||||
if (this.tags == null) {
|
||||
this.tags = new ArrayList<Tag>();
|
||||
this.tags = new ArrayList<>();
|
||||
}
|
||||
this.tags.add(tagsItem);
|
||||
return this;
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -374,6 +374,46 @@ if (enumQueryDouble != null)
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
// query params
|
||||
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 = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -168,8 +168,9 @@ public class PetApi {
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -115,10 +115,6 @@ public class AnotherFakeApi {
|
||||
com.squareup.okhttp.Call call = testSpecialTagsCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,10 +114,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -235,10 +231,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -356,10 +348,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterNumberSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -477,10 +465,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterStringSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -603,10 +587,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testClientModelCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -785,10 +765,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -964,10 +940,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testEnumParametersCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1046,6 +1018,124 @@ public class FakeApi {
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for testInlineAdditionalProperties
|
||||
* @param param request body (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call testInlineAdditionalPropertiesCall(Object param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call testInlineAdditionalPropertiesValidateBeforeCall(Object param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException("Missing the required parameter 'param' when calling testInlineAdditionalProperties(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = testInlineAdditionalPropertiesCall(param, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
testInlineAdditionalPropertiesWithHttpInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Object param) throws ApiException {
|
||||
com.squareup.okhttp.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, null, null);
|
||||
return apiClient.execute(call);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties (asynchronously)
|
||||
*
|
||||
* @param param request body (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 com.squareup.okhttp.Call testInlineAdditionalPropertiesAsync(Object param, 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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for testJsonFormData
|
||||
* @param param field1 (required)
|
||||
@ -1117,10 +1207,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testJsonFormDataCall(param, param2, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,10 +115,6 @@ public class FakeClassnameTags123Api {
|
||||
com.squareup.okhttp.Call call = testClassnameCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,10 +117,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -243,10 +239,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,10 +362,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -442,7 +430,9 @@ public class PetApi {
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public com.squareup.okhttp.Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
@ -486,6 +476,7 @@ public class PetApi {
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
@ -498,10 +489,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -510,7 +497,9 @@ public class PetApi {
|
||||
* @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
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
ApiResponse<List<Pet>> resp = findPetsByTagsWithHttpInfo(tags);
|
||||
return resp.getData();
|
||||
@ -522,7 +511,9 @@ public class PetApi {
|
||||
* @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
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||
com.squareup.okhttp.Call call = findPetsByTagsValidateBeforeCall(tags, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
@ -536,7 +527,9 @@ public class PetApi {
|
||||
* @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
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public com.squareup.okhttp.Call findPetsByTagsAsync(List<String> tags, final ApiCallback<List<Pet>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
@ -625,10 +618,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -751,10 +740,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -880,10 +865,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1015,10 +996,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,10 +116,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -232,10 +228,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = getInventoryCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -356,10 +348,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -482,10 +470,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = placeOrderCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,10 +115,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = createUserCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -237,10 +233,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -359,10 +351,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -482,10 +470,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = deleteUserCall(username, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -605,10 +589,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = getUserByNameCall(username, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -741,10 +721,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = loginUserCall(username, password, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -864,10 +840,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = logoutUserCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -990,10 +962,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = updateUserCall(username, body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -115,10 +115,6 @@ public class AnotherFakeApi {
|
||||
com.squareup.okhttp.Call call = testSpecialTagsCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -114,10 +114,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterBooleanSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -235,10 +231,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterCompositeSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -356,10 +348,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterNumberSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -477,10 +465,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = fakeOuterStringSerializeCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -603,10 +587,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testClientModelCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -785,10 +765,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testEndpointParametersCall(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -964,10 +940,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testEnumParametersCall(enumFormStringArray, enumFormString, enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1046,6 +1018,124 @@ public class FakeApi {
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for testInlineAdditionalProperties
|
||||
* @param param request body (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public com.squareup.okhttp.Call testInlineAdditionalPropertiesCall(Object param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties";
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
|
||||
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||
|
||||
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if(progressListener != null) {
|
||||
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
|
||||
@Override
|
||||
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
|
||||
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.build();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call testInlineAdditionalPropertiesValidateBeforeCall(Object param, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException("Missing the required parameter 'param' when calling testInlineAdditionalProperties(Async)");
|
||||
}
|
||||
|
||||
|
||||
com.squareup.okhttp.Call call = testInlineAdditionalPropertiesCall(param, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
testInlineAdditionalPropertiesWithHttpInfo(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> testInlineAdditionalPropertiesWithHttpInfo(Object param) throws ApiException {
|
||||
com.squareup.okhttp.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, null, null);
|
||||
return apiClient.execute(call);
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties (asynchronously)
|
||||
*
|
||||
* @param param request body (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 com.squareup.okhttp.Call testInlineAdditionalPropertiesAsync(Object param, 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);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
com.squareup.okhttp.Call call = testInlineAdditionalPropertiesValidateBeforeCall(param, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
}
|
||||
/**
|
||||
* Build call for testJsonFormData
|
||||
* @param param field1 (required)
|
||||
@ -1117,10 +1207,6 @@ public class FakeApi {
|
||||
com.squareup.okhttp.Call call = testJsonFormDataCall(param, param2, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,10 +115,6 @@ public class FakeClassnameTags123Api {
|
||||
com.squareup.okhttp.Call call = testClassnameCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -117,10 +117,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = addPetCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -243,10 +239,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = deletePetCall(petId, apiKey, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,10 +362,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = findPetsByStatusCall(status, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -442,7 +430,9 @@ public class PetApi {
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public com.squareup.okhttp.Call findPetsByTagsCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
@ -486,6 +476,7 @@ public class PetApi {
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
@SuppressWarnings("rawtypes")
|
||||
private com.squareup.okhttp.Call findPetsByTagsValidateBeforeCall(List<String> tags, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
|
||||
@ -498,10 +489,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = findPetsByTagsCall(tags, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -510,7 +497,9 @@ public class PetApi {
|
||||
* @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
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
ApiResponse<List<Pet>> resp = findPetsByTagsWithHttpInfo(tags);
|
||||
return resp.getData();
|
||||
@ -522,7 +511,9 @@ public class PetApi {
|
||||
* @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
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public ApiResponse<List<Pet>> findPetsByTagsWithHttpInfo(List<String> tags) throws ApiException {
|
||||
com.squareup.okhttp.Call call = findPetsByTagsValidateBeforeCall(tags, null, null);
|
||||
Type localVarReturnType = new TypeToken<List<Pet>>(){}.getType();
|
||||
@ -536,7 +527,9 @@ public class PetApi {
|
||||
* @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
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public com.squareup.okhttp.Call findPetsByTagsAsync(List<String> tags, final ApiCallback<List<Pet>> callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
@ -625,10 +618,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = getPetByIdCall(petId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -751,10 +740,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = updatePetCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -880,10 +865,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = updatePetWithFormCall(petId, name, status, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1015,10 +996,6 @@ public class PetApi {
|
||||
com.squareup.okhttp.Call call = uploadFileCall(petId, additionalMetadata, file, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,10 +116,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -232,10 +228,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = getInventoryCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -356,10 +348,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -482,10 +470,6 @@ public class StoreApi {
|
||||
com.squareup.okhttp.Call call = placeOrderCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -115,10 +115,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = createUserCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -237,10 +233,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = createUsersWithArrayInputCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -359,10 +351,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = createUsersWithListInputCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -482,10 +470,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = deleteUserCall(username, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -605,10 +589,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = getUserByNameCall(username, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -741,10 +721,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = loginUserCall(username, password, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -864,10 +840,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = logoutUserCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@ -990,10 +962,6 @@ public class UserApi {
|
||||
com.squareup.okhttp.Call call = updateUserCall(username, body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -374,6 +374,46 @@ if (enumQueryDouble != null)
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws ApiException {
|
||||
Object localVarPostBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/inline-additionalProperties".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
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 = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -168,8 +168,9 @@ public class PetApi {
|
||||
* @param tags Tags to filter by (required)
|
||||
* @return List<Pet>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @Deprecated
|
||||
* @deprecated
|
||||
*/
|
||||
@Deprecated
|
||||
public List<Pet> findPetsByTags(List<String> tags) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -340,6 +340,39 @@ public class FakeApi {
|
||||
ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};
|
||||
apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param param request body
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws RestClientException {
|
||||
Object postBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
String path = UriComponentsBuilder.fromPath("/fake/inline-additionalProperties").build().toUriString();
|
||||
|
||||
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
|
||||
final HttpHeaders headerParams = new HttpHeaders();
|
||||
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
|
||||
|
||||
final String[] accepts = { };
|
||||
final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);
|
||||
final String[] contentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};
|
||||
apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** /fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** /fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -376,6 +377,50 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
apiInstance.testInlineAdditionalProperties(param);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> testJsonFormData(param, param2)
|
||||
|
@ -340,6 +340,39 @@ public class FakeApi {
|
||||
ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};
|
||||
apiClient.invokeAPI(path, HttpMethod.GET, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
||||
}
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* <p><b>200</b> - successful operation
|
||||
* @param param request body
|
||||
* @throws RestClientException if an error occurs while attempting to invoke the API
|
||||
*/
|
||||
public void testInlineAdditionalProperties(Object param) throws RestClientException {
|
||||
Object postBody = param;
|
||||
|
||||
// verify the required parameter 'param' is set
|
||||
if (param == null) {
|
||||
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
String path = UriComponentsBuilder.fromPath("/fake/inline-additionalProperties").build().toUriString();
|
||||
|
||||
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<String, String>();
|
||||
final HttpHeaders headerParams = new HttpHeaders();
|
||||
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<String, Object>();
|
||||
|
||||
final String[] accepts = { };
|
||||
final List<MediaType> accept = apiClient.selectHeaderAccept(accepts);
|
||||
final String[] contentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
|
||||
ParameterizedTypeReference<Void> returnType = new ParameterizedTypeReference<Void>() {};
|
||||
apiClient.invokeAPI(path, HttpMethod.POST, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
||||
}
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -230,6 +230,30 @@ public interface FakeApi {
|
||||
void testEnumParameters(
|
||||
@retrofit.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit.http.Field("enum_form_string") String enumFormString, @retrofit.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit.http.Header("enum_header_string") String enumHeaderString, @retrofit.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit.http.Query("enum_query_string") String enumQueryString, @retrofit.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit.http.Field("enum_query_double") Double enumQueryDouble, Callback<Void> cb
|
||||
);
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
* Sync method
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return Void
|
||||
*/
|
||||
|
||||
@POST("/fake/inline-additionalProperties")
|
||||
Void testInlineAdditionalProperties(
|
||||
@retrofit.http.Body Object param
|
||||
);
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
* Async method
|
||||
* @param param request body (required)
|
||||
* @param cb callback method
|
||||
*/
|
||||
|
||||
@POST("/fake/inline-additionalProperties")
|
||||
void testInlineAdditionalProperties(
|
||||
@retrofit.http.Body Object param, Callback<Void> cb
|
||||
);
|
||||
/**
|
||||
* test json serialization of form data
|
||||
* Sync method
|
||||
|
@ -100,6 +100,7 @@ ext {
|
||||
play_version = "2.4.11"
|
||||
swagger_annotations_version = "1.5.15"
|
||||
junit_version = "4.12"
|
||||
json_fire_version = "1.8.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@ -108,6 +109,7 @@ dependencies {
|
||||
compile "com.squareup.retrofit2:converter-gson:$retrofit_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "com.typesafe.play:play-java-ws_2.11:$play_version"
|
||||
compile "com.squareup.retrofit2:converter-jackson:$retrofit_version"
|
||||
compile "com.fasterxml.jackson.core:jackson-core:$jackson_version"
|
||||
|
@ -18,6 +18,7 @@ lazy val root = (project in file(".")).
|
||||
"com.squareup.retrofit2" % "converter-jackson" % "2.3.0" % "compile",
|
||||
"io.swagger" % "swagger-annotations" % "1.5.15" % "compile",
|
||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
||||
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
|
||||
"junit" % "junit" % "4.12" % "test",
|
||||
"com.novocode" % "junit-interface" % "0.11" % "test"
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -378,6 +379,51 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> Void testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
Void result = apiInstance.testInlineAdditionalProperties(param);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Void**](.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> Void testJsonFormData(param, param2)
|
||||
|
@ -194,6 +194,11 @@
|
||||
<artifactId>org.apache.oltu.oauth2.client</artifactId>
|
||||
<version>${oltu-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.gsonfire</groupId>
|
||||
<artifactId>gson-fire</artifactId>
|
||||
<version>${gson-fire-version}</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON processing: jackson -->
|
||||
<dependency>
|
||||
@ -241,6 +246,7 @@
|
||||
<java.version>1.8</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<swagger-core-version>1.5.15</swagger-core-version>
|
||||
<jackson-version>2.6.6</jackson-version>
|
||||
<play-version>2.4.11</play-version>
|
||||
|
@ -126,6 +126,20 @@ public interface FakeApi {
|
||||
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
||||
);
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({
|
||||
"Content-Type:application/json"
|
||||
})
|
||||
@POST("fake/inline-additionalProperties")
|
||||
F.Promise<Response<Void>> testInlineAdditionalProperties(
|
||||
@retrofit2.http.Body Object param
|
||||
);
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -43,7 +43,7 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
|
||||
if (this.mapProperty == null) {
|
||||
this.mapProperty = new HashMap<String, String>();
|
||||
this.mapProperty = new HashMap<>();
|
||||
}
|
||||
this.mapProperty.put(key, mapPropertyItem);
|
||||
return this;
|
||||
@ -69,7 +69,7 @@ public class AdditionalPropertiesClass {
|
||||
|
||||
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
|
||||
if (this.mapOfMapProperty == null) {
|
||||
this.mapOfMapProperty = new HashMap<String, Map<String, String>>();
|
||||
this.mapOfMapProperty = new HashMap<>();
|
||||
}
|
||||
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
|
||||
return this;
|
||||
|
@ -40,7 +40,7 @@ public class ArrayOfArrayOfNumberOnly {
|
||||
|
||||
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
|
||||
if (this.arrayArrayNumber == null) {
|
||||
this.arrayArrayNumber = new ArrayList<List<BigDecimal>>();
|
||||
this.arrayArrayNumber = new ArrayList<>();
|
||||
}
|
||||
this.arrayArrayNumber.add(arrayArrayNumberItem);
|
||||
return this;
|
||||
|
@ -40,7 +40,7 @@ public class ArrayOfNumberOnly {
|
||||
|
||||
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
|
||||
if (this.arrayNumber == null) {
|
||||
this.arrayNumber = new ArrayList<BigDecimal>();
|
||||
this.arrayNumber = new ArrayList<>();
|
||||
}
|
||||
this.arrayNumber.add(arrayNumberItem);
|
||||
return this;
|
||||
|
@ -46,7 +46,7 @@ public class ArrayTest {
|
||||
|
||||
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
|
||||
if (this.arrayOfString == null) {
|
||||
this.arrayOfString = new ArrayList<String>();
|
||||
this.arrayOfString = new ArrayList<>();
|
||||
}
|
||||
this.arrayOfString.add(arrayOfStringItem);
|
||||
return this;
|
||||
@ -72,7 +72,7 @@ public class ArrayTest {
|
||||
|
||||
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
|
||||
if (this.arrayArrayOfInteger == null) {
|
||||
this.arrayArrayOfInteger = new ArrayList<List<Long>>();
|
||||
this.arrayArrayOfInteger = new ArrayList<>();
|
||||
}
|
||||
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
|
||||
return this;
|
||||
@ -99,7 +99,7 @@ public class ArrayTest {
|
||||
|
||||
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
|
||||
if (this.arrayArrayOfModel == null) {
|
||||
this.arrayArrayOfModel = new ArrayList<List<ReadOnlyFirst>>();
|
||||
this.arrayArrayOfModel = new ArrayList<>();
|
||||
}
|
||||
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
|
||||
return this;
|
||||
|
@ -130,7 +130,7 @@ public class EnumArrays {
|
||||
|
||||
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
|
||||
if (this.arrayEnum == null) {
|
||||
this.arrayEnum = new ArrayList<ArrayEnumEnum>();
|
||||
this.arrayEnum = new ArrayList<>();
|
||||
}
|
||||
this.arrayEnum.add(arrayEnumItem);
|
||||
return this;
|
||||
|
@ -78,7 +78,7 @@ public class MapTest {
|
||||
|
||||
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
|
||||
if (this.mapMapOfString == null) {
|
||||
this.mapMapOfString = new HashMap<String, Map<String, String>>();
|
||||
this.mapMapOfString = new HashMap<>();
|
||||
}
|
||||
this.mapMapOfString.put(key, mapMapOfStringItem);
|
||||
return this;
|
||||
@ -105,7 +105,7 @@ public class MapTest {
|
||||
|
||||
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
|
||||
if (this.mapOfEnumString == null) {
|
||||
this.mapOfEnumString = new HashMap<String, InnerEnum>();
|
||||
this.mapOfEnumString = new HashMap<>();
|
||||
}
|
||||
this.mapOfEnumString.put(key, mapOfEnumStringItem);
|
||||
return this;
|
||||
|
@ -87,7 +87,7 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
|
||||
if (this.map == null) {
|
||||
this.map = new HashMap<String, Animal>();
|
||||
this.map = new HashMap<>();
|
||||
}
|
||||
this.map.put(key, mapItem);
|
||||
return this;
|
||||
|
@ -41,7 +41,7 @@ public class Pet {
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
private List<String> photoUrls = new ArrayList<>();
|
||||
|
||||
@JsonProperty("tags")
|
||||
private List<Tag> tags = null;
|
||||
@ -173,7 +173,7 @@ public class Pet {
|
||||
|
||||
public Pet addTagsItem(Tag tagsItem) {
|
||||
if (this.tags == null) {
|
||||
this.tags = new ArrayList<Tag>();
|
||||
this.tags = new ArrayList<>();
|
||||
}
|
||||
this.tags.add(tagsItem);
|
||||
return this;
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -378,6 +379,51 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> Void testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
Void result = apiInstance.testInlineAdditionalProperties(param);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Void**](.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> Void testJsonFormData(param, param2)
|
||||
|
@ -122,6 +122,20 @@ public interface FakeApi {
|
||||
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
||||
);
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({
|
||||
"Content-Type:application/json"
|
||||
})
|
||||
@POST("fake/inline-additionalProperties")
|
||||
Call<Void> testInlineAdditionalProperties(
|
||||
@retrofit2.http.Body Object param
|
||||
);
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -100,6 +100,7 @@ ext {
|
||||
junit_version = "4.12"
|
||||
rx_java_version = "1.3.0"
|
||||
threetenbp_version = "1.3.5"
|
||||
json_fire_version = "1.8.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@ -110,6 +111,7 @@ dependencies {
|
||||
compile "io.reactivex:rxjava:$rx_java_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
|
||||
testCompile "junit:junit:$junit_version"
|
||||
|
@ -17,6 +17,7 @@ lazy val root = (project in file(".")).
|
||||
"io.swagger" % "swagger-annotations" % "1.5.15" % "compile",
|
||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
||||
"org.threeten" % "threetenbp" % "1.3.5" % "compile",
|
||||
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
|
||||
"junit" % "junit" % "4.12" % "test",
|
||||
"com.novocode" % "junit-interface" % "0.11" % "test"
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -378,6 +379,51 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> Void testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
Void result = apiInstance.testInlineAdditionalProperties(param);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Void**](.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> Void testJsonFormData(param, param2)
|
||||
|
@ -194,6 +194,11 @@
|
||||
<artifactId>org.apache.oltu.oauth2.client</artifactId>
|
||||
<version>${oltu-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.gsonfire</groupId>
|
||||
<artifactId>gson-fire</artifactId>
|
||||
<version>${gson-fire-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.threeten</groupId>
|
||||
<artifactId>threetenbp</artifactId>
|
||||
@ -225,6 +230,7 @@
|
||||
<java.version>1.7</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<swagger-core-version>1.5.15</swagger-core-version>
|
||||
<retrofit-version>2.3.0</retrofit-version>
|
||||
<rxjava-version>1.3.0</rxjava-version>
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonElement;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.RequestBody;
|
||||
@ -26,6 +27,7 @@ import java.lang.reflect.Type;
|
||||
import java.text.DateFormat;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ApiClient {
|
||||
|
||||
|
@ -20,10 +20,15 @@ import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.internal.bind.util.ISO8601Utils;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.gsonfire.GsonFireBuilder;
|
||||
import io.gsonfire.TypeSelector;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.threeten.bp.format.DateTimeFormatter;
|
||||
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.lang.reflect.Type;
|
||||
@ -31,6 +36,8 @@ import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class JSON {
|
||||
private Gson gson;
|
||||
@ -39,8 +46,42 @@ public class JSON {
|
||||
private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
|
||||
private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
|
||||
|
||||
public static GsonBuilder createGson() {
|
||||
GsonFireBuilder fireBuilder = new GsonFireBuilder()
|
||||
.registerTypeSelector(Animal.class, new TypeSelector() {
|
||||
@Override
|
||||
public Class getClassForElement(JsonElement readElement) {
|
||||
Map classByDiscriminatorValue = new HashMap();
|
||||
classByDiscriminatorValue.put("Cat".toUpperCase(), Cat.class);
|
||||
classByDiscriminatorValue.put("Dog".toUpperCase(), Dog.class);
|
||||
classByDiscriminatorValue.put("Animal".toUpperCase(), Animal.class);
|
||||
return getClassByDiscriminator(
|
||||
classByDiscriminatorValue,
|
||||
getDiscriminatorValue(readElement, "className"));
|
||||
}
|
||||
})
|
||||
;
|
||||
return fireBuilder.createGsonBuilder();
|
||||
}
|
||||
|
||||
private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
|
||||
JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
|
||||
if(null == element) {
|
||||
throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
|
||||
}
|
||||
return element.getAsString();
|
||||
}
|
||||
|
||||
private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
|
||||
Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
|
||||
if(null == clazz) {
|
||||
throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public JSON() {
|
||||
gson = new GsonBuilder()
|
||||
gson = createGson()
|
||||
.registerTypeAdapter(Date.class, dateTypeAdapter)
|
||||
.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
|
||||
.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
|
||||
|
@ -122,6 +122,20 @@ public interface FakeApi {
|
||||
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
||||
);
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({
|
||||
"Content-Type:application/json"
|
||||
})
|
||||
@POST("fake/inline-additionalProperties")
|
||||
Observable<Void> testInlineAdditionalProperties(
|
||||
@retrofit2.http.Body Object param
|
||||
);
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
@ -100,6 +100,7 @@ ext {
|
||||
junit_version = "4.12"
|
||||
rx_java_version = "2.1.1"
|
||||
threetenbp_version = "1.3.5"
|
||||
json_fire_version = "1.8.0"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@ -110,6 +111,7 @@ dependencies {
|
||||
compile "io.reactivex.rxjava2:rxjava:$rx_java_version"
|
||||
compile "io.swagger:swagger-annotations:$swagger_annotations_version"
|
||||
compile "org.apache.oltu.oauth2:org.apache.oltu.oauth2.client:$oltu_version"
|
||||
compile "io.gsonfire:gson-fire:$json_fire_version"
|
||||
compile "org.threeten:threetenbp:$threetenbp_version"
|
||||
|
||||
testCompile "junit:junit:$junit_version"
|
||||
|
@ -17,6 +17,7 @@ lazy val root = (project in file(".")).
|
||||
"io.swagger" % "swagger-annotations" % "1.5.15" % "compile",
|
||||
"org.apache.oltu.oauth2" % "org.apache.oltu.oauth2.client" % "1.0.1" % "compile",
|
||||
"org.threeten" % "threetenbp" % "1.3.5" % "compile",
|
||||
"io.gsonfire" % "gson-fire" % "1.8.0" % "compile",
|
||||
"junit" % "junit" % "4.12" % "test",
|
||||
"com.novocode" % "junit-interface" % "0.11" % "test"
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ Method | HTTP request | Description
|
||||
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** fake | To test \"client\" model
|
||||
[**testEndpointParameters**](FakeApi.md#testEndpointParameters) | **POST** fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
[**testEnumParameters**](FakeApi.md#testEnumParameters) | **GET** fake | To test enum parameters
|
||||
[**testInlineAdditionalProperties**](FakeApi.md#testInlineAdditionalProperties) | **POST** fake/inline-additionalProperties | test inline additionalProperties
|
||||
[**testJsonFormData**](FakeApi.md#testJsonFormData) | **GET** fake/jsonFormData | test json serialization of form data
|
||||
|
||||
|
||||
@ -378,6 +379,51 @@ No authorization required
|
||||
- **Content-Type**: */*
|
||||
- **Accept**: */*
|
||||
|
||||
<a name="testInlineAdditionalProperties"></a>
|
||||
# **testInlineAdditionalProperties**
|
||||
> Void testInlineAdditionalProperties(param)
|
||||
|
||||
test inline additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.api.FakeApi;
|
||||
|
||||
|
||||
FakeApi apiInstance = new FakeApi();
|
||||
Object param = null; // Object | request body
|
||||
try {
|
||||
Void result = apiInstance.testInlineAdditionalProperties(param);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testInlineAdditionalProperties");
|
||||
e.printStackTrace();
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**param** | **Object**| request body |
|
||||
|
||||
### Return type
|
||||
|
||||
[**Void**](.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
<a name="testJsonFormData"></a>
|
||||
# **testJsonFormData**
|
||||
> Void testJsonFormData(param, param2)
|
||||
|
@ -194,6 +194,11 @@
|
||||
<artifactId>org.apache.oltu.oauth2.client</artifactId>
|
||||
<version>${oltu-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.gsonfire</groupId>
|
||||
<artifactId>gson-fire</artifactId>
|
||||
<version>${gson-fire-version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.threeten</groupId>
|
||||
<artifactId>threetenbp</artifactId>
|
||||
@ -225,6 +230,7 @@
|
||||
<java.version>1.7</java.version>
|
||||
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||
<gson-fire-version>1.8.0</gson-fire-version>
|
||||
<swagger-core-version>1.5.15</swagger-core-version>
|
||||
<retrofit-version>2.3.0</retrofit-version>
|
||||
<rxjava-version>2.1.1</rxjava-version>
|
||||
|
@ -2,6 +2,7 @@ package io.swagger.client;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.JsonElement;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.RequestBody;
|
||||
@ -26,6 +27,7 @@ import java.lang.reflect.Type;
|
||||
import java.text.DateFormat;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class ApiClient {
|
||||
|
||||
|
@ -20,10 +20,15 @@ import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.internal.bind.util.ISO8601Utils;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import com.google.gson.JsonElement;
|
||||
import io.gsonfire.GsonFireBuilder;
|
||||
import io.gsonfire.TypeSelector;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.threeten.bp.format.DateTimeFormatter;
|
||||
|
||||
import io.swagger.client.model.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.StringReader;
|
||||
import java.lang.reflect.Type;
|
||||
@ -31,6 +36,8 @@ import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.ParsePosition;
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class JSON {
|
||||
private Gson gson;
|
||||
@ -39,8 +46,42 @@ public class JSON {
|
||||
private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter();
|
||||
private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter();
|
||||
|
||||
public static GsonBuilder createGson() {
|
||||
GsonFireBuilder fireBuilder = new GsonFireBuilder()
|
||||
.registerTypeSelector(Animal.class, new TypeSelector() {
|
||||
@Override
|
||||
public Class getClassForElement(JsonElement readElement) {
|
||||
Map classByDiscriminatorValue = new HashMap();
|
||||
classByDiscriminatorValue.put("Cat".toUpperCase(), Cat.class);
|
||||
classByDiscriminatorValue.put("Dog".toUpperCase(), Dog.class);
|
||||
classByDiscriminatorValue.put("Animal".toUpperCase(), Animal.class);
|
||||
return getClassByDiscriminator(
|
||||
classByDiscriminatorValue,
|
||||
getDiscriminatorValue(readElement, "className"));
|
||||
}
|
||||
})
|
||||
;
|
||||
return fireBuilder.createGsonBuilder();
|
||||
}
|
||||
|
||||
private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) {
|
||||
JsonElement element = readElement.getAsJsonObject().get(discriminatorField);
|
||||
if(null == element) {
|
||||
throw new IllegalArgumentException("missing discriminator field: <" + discriminatorField + ">");
|
||||
}
|
||||
return element.getAsString();
|
||||
}
|
||||
|
||||
private static Class getClassByDiscriminator(Map classByDiscriminatorValue, String discriminatorValue) {
|
||||
Class clazz = (Class) classByDiscriminatorValue.get(discriminatorValue.toUpperCase());
|
||||
if(null == clazz) {
|
||||
throw new IllegalArgumentException("cannot determine model class of name: <" + discriminatorValue + ">");
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public JSON() {
|
||||
gson = new GsonBuilder()
|
||||
gson = createGson()
|
||||
.registerTypeAdapter(Date.class, dateTypeAdapter)
|
||||
.registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter)
|
||||
.registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter)
|
||||
|
@ -122,6 +122,20 @@ public interface FakeApi {
|
||||
@retrofit2.http.Field("enum_form_string_array") List<String> enumFormStringArray, @retrofit2.http.Field("enum_form_string") String enumFormString, @retrofit2.http.Header("enum_header_string_array") List<String> enumHeaderStringArray, @retrofit2.http.Header("enum_header_string") String enumHeaderString, @retrofit2.http.Query("enum_query_string_array") CSVParams enumQueryStringArray, @retrofit2.http.Query("enum_query_string") String enumQueryString, @retrofit2.http.Query("enum_query_integer") Integer enumQueryInteger, @retrofit2.http.Field("enum_query_double") Double enumQueryDouble
|
||||
);
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
* @param param request body (required)
|
||||
* @return Call<Void>
|
||||
*/
|
||||
@Headers({
|
||||
"Content-Type:application/json"
|
||||
})
|
||||
@POST("fake/inline-additionalProperties")
|
||||
Observable<Void> testInlineAdditionalProperties(
|
||||
@retrofit2.http.Body Object param
|
||||
);
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user