update samples

This commit is contained in:
William Cheng 2019-01-26 22:03:58 +08:00
parent 860b91e45e
commit 706192980c
3 changed files with 26 additions and 26 deletions

View File

@ -864,7 +864,7 @@ namespace Org.OpenAPITools.Api
} }
return new ApiResponse<Object>(localVarStatusCode, return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null); null);
} }
@ -942,7 +942,7 @@ namespace Org.OpenAPITools.Api
} }
return new ApiResponse<Object>(localVarStatusCode, return new ApiResponse<Object>(localVarStatusCode,
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
null); null);
} }

View File

@ -70,7 +70,7 @@ public class FakeApi {
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @throws ApiException If fail to serialize the request body object
*/ */
public com.squareup.okhttp.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = xmlItem; Object localVarPostBody = xmlItem;
// create path and map variables // create path and map variables
@ -95,15 +95,15 @@ public class FakeApi {
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build(); .build();
} }
}); }).build());
} }
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
@ -111,7 +111,7 @@ public class FakeApi {
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'xmlItem' is set // verify the required parameter 'xmlItem' is set
if (xmlItem == null) { if (xmlItem == null) {
@ -119,7 +119,7 @@ public class FakeApi {
} }
com.squareup.okhttp.Call call = createXmlItemCall(xmlItem, progressListener, progressRequestListener); okhttp3.Call call = createXmlItemCall(xmlItem, progressListener, progressRequestListener);
return call; return call;
} }
@ -142,7 +142,7 @@ public class FakeApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
com.squareup.okhttp.Call call = createXmlItemValidateBeforeCall(xmlItem, null, null); okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, null, null);
return apiClient.execute(call); return apiClient.execute(call);
} }
@ -154,7 +154,7 @@ public class FakeApi {
* @return The request call * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public com.squareup.okhttp.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback<Void> callback) throws ApiException { public okhttp3.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@ -175,7 +175,7 @@ public class FakeApi {
}; };
} }
com.squareup.okhttp.Call call = createXmlItemValidateBeforeCall(xmlItem, progressListener, progressRequestListener); okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback); apiClient.executeAsync(call, callback);
return call; return call;
} }

View File

@ -70,7 +70,7 @@ public class FakeApi {
* @return Call to execute * @return Call to execute
* @throws ApiException If fail to serialize the request body object * @throws ApiException If fail to serialize the request body object
*/ */
public com.squareup.okhttp.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { public okhttp3.Call createXmlItemCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = xmlItem; Object localVarPostBody = xmlItem;
// create path and map variables // create path and map variables
@ -95,15 +95,15 @@ public class FakeApi {
localVarHeaderParams.put("Content-Type", localVarContentType); localVarHeaderParams.put("Content-Type", localVarContentType);
if (progressListener != null) { if (progressListener != null) {
apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
@Override @Override
public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); okhttp3.Response originalResponse = chain.proceed(chain.request());
return originalResponse.newBuilder() return originalResponse.newBuilder()
.body(new ProgressResponseBody(originalResponse.body(), progressListener)) .body(new ProgressResponseBody(originalResponse.body(), progressListener))
.build(); .build();
} }
}); }).build());
} }
String[] localVarAuthNames = new String[] { }; String[] localVarAuthNames = new String[] { };
@ -111,7 +111,7 @@ public class FakeApi {
} }
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { private okhttp3.Call createXmlItemValidateBeforeCall(XmlItem xmlItem, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'xmlItem' is set // verify the required parameter 'xmlItem' is set
if (xmlItem == null) { if (xmlItem == null) {
@ -119,7 +119,7 @@ public class FakeApi {
} }
com.squareup.okhttp.Call call = createXmlItemCall(xmlItem, progressListener, progressRequestListener); okhttp3.Call call = createXmlItemCall(xmlItem, progressListener, progressRequestListener);
return call; return call;
} }
@ -142,7 +142,7 @@ public class FakeApi {
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/ */
public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException { public ApiResponse<Void> createXmlItemWithHttpInfo(XmlItem xmlItem) throws ApiException {
com.squareup.okhttp.Call call = createXmlItemValidateBeforeCall(xmlItem, null, null); okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, null, null);
return apiClient.execute(call); return apiClient.execute(call);
} }
@ -154,7 +154,7 @@ public class FakeApi {
* @return The request call * @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object * @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/ */
public com.squareup.okhttp.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback<Void> callback) throws ApiException { public okhttp3.Call createXmlItemAsync(XmlItem xmlItem, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null; ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@ -175,7 +175,7 @@ public class FakeApi {
}; };
} }
com.squareup.okhttp.Call call = createXmlItemValidateBeforeCall(xmlItem, progressListener, progressRequestListener); okhttp3.Call call = createXmlItemValidateBeforeCall(xmlItem, progressListener, progressRequestListener);
apiClient.executeAsync(call, callback); apiClient.executeAsync(call, callback);
return call; return call;
} }