forked from loafle/openapi-generator-original
Remove localVarPrefix from Java client (#2045)
* remove localVarPrefix from java client * rename local varaible * update samples
This commit is contained in:
parent
36fa7102dd
commit
0a2fb8db8f
@ -29,7 +29,6 @@ sidebar_label: groovy
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java-inflector
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java-msf4j
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java-pkmst
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java-play-framework
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java-undertow-server
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java-vertx
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: java
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf-cdi
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf-client
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-cxf
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-jersey
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-resteasy-eap
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-resteasy
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: jaxrs-spec
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -29,7 +29,6 @@ sidebar_label: spring
|
||||
|licenseName|The name of the license| |null|
|
||||
|licenseUrl|The URL of the license| |null|
|
||||
|sourceFolder|source folder for generated code| |null|
|
||||
|localVariablePrefix|prefix for generated code members and local variables| |null|
|
||||
|serializableModel|boolean - toggle "implements Serializable" for generated models| |false|
|
||||
|bigDecimalAsString|Treat BigDecimal values as Strings to avoid precision loss.| |false|
|
||||
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
|
||||
|
@ -161,7 +161,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
cliOptions.add(new CliOption(CodegenConstants.LICENSE_NAME, CodegenConstants.LICENSE_NAME_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.LICENSE_URL, CodegenConstants.LICENSE_URL_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.SOURCE_FOLDER, CodegenConstants.SOURCE_FOLDER_DESC));
|
||||
cliOptions.add(new CliOption(CodegenConstants.LOCAL_VARIABLE_PREFIX, CodegenConstants.LOCAL_VARIABLE_PREFIX_DESC));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZABLE_MODEL, CodegenConstants.SERIALIZABLE_MODEL_DESC));
|
||||
cliOptions.add(CliOption.newBoolean(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, CodegenConstants
|
||||
.SERIALIZE_BIG_DECIMAL_AS_STRING_DESC));
|
||||
@ -341,10 +340,6 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
|
||||
}
|
||||
additionalProperties.put(CodegenConstants.SOURCE_FOLDER, sourceFolder);
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.LOCAL_VARIABLE_PREFIX)) {
|
||||
this.setLocalVariablePrefix((String) additionalProperties.get(CodegenConstants.LOCAL_VARIABLE_PREFIX));
|
||||
}
|
||||
|
||||
if (additionalProperties.containsKey(CodegenConstants.SERIALIZABLE_MODEL)) {
|
||||
this.setSerializableModel(Boolean.valueOf(additionalProperties.get(CodegenConstants.SERIALIZABLE_MODEL).toString()));
|
||||
}
|
||||
|
@ -44,30 +44,30 @@ import java.util.Map;
|
||||
|
||||
{{#operations}}
|
||||
public class {{classname}} {
|
||||
private ApiClient {{localVariablePrefix}}apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public {{classname}}() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public {{classname}}(ApiClient apiClient) {
|
||||
this.{{localVariablePrefix}}apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return {{localVariablePrefix}}apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.{{localVariablePrefix}}apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
{{#operation}}
|
||||
{{^vendorExtensions.x-group-parameters}}/**
|
||||
* Build call for {{operationId}}{{#allParams}}
|
||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
{{#isDeprecated}}
|
||||
@ -81,70 +81,70 @@ public class {{classname}} {
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
Object {{localVariablePrefix}}localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};
|
||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Call({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}new Object(){{/bodyParam}};
|
||||
|
||||
// create path and map variables
|
||||
String {{localVariablePrefix}}localVarPath = "{{{path}}}"{{#pathParams}}
|
||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", {{localVariablePrefix}}apiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||
String localVarPath = "{{{path}}}"{{#pathParams}}
|
||||
.replaceAll("\\{" + "{{baseName}}" + "\\}", localVarApiClient.escapeString({{{paramName}}}.toString())){{/pathParams}};
|
||||
|
||||
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
||||
{{javaUtilPrefix}}List<Pair> {{localVariablePrefix}}localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
||||
{{javaUtilPrefix}}List<Pair> localVarQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
||||
{{javaUtilPrefix}}List<Pair> localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList<Pair>();
|
||||
{{#queryParams}}
|
||||
if ({{paramName}} != null) {
|
||||
{{localVariablePrefix}}{{#collectionFormat}}localVarCollectionQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll({{localVariablePrefix}}apiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}}));
|
||||
{{#collectionFormat}}localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(localVarApiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}}));
|
||||
}
|
||||
|
||||
{{/queryParams}}
|
||||
{{javaUtilPrefix}}Map<String, String> {{localVariablePrefix}}localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
||||
{{javaUtilPrefix}}Map<String, String> localVarHeaderParams = new {{javaUtilPrefix}}HashMap<String, String>();
|
||||
{{#headerParams}}
|
||||
if ({{paramName}} != null) {
|
||||
{{localVariablePrefix}}localVarHeaderParams.put("{{baseName}}", {{localVariablePrefix}}apiClient.parameterToString({{paramName}}));
|
||||
localVarHeaderParams.put("{{baseName}}", localVarApiClient.parameterToString({{paramName}}));
|
||||
}
|
||||
|
||||
{{/headerParams}}
|
||||
{{javaUtilPrefix}}Map<String, Object> {{localVariablePrefix}}localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
||||
{{javaUtilPrefix}}Map<String, Object> localVarFormParams = new {{javaUtilPrefix}}HashMap<String, Object>();
|
||||
{{#formParams}}
|
||||
if ({{paramName}} != null) {
|
||||
{{localVariablePrefix}}localVarFormParams.put("{{baseName}}", {{paramName}});
|
||||
localVarFormParams.put("{{baseName}}", {{paramName}});
|
||||
}
|
||||
|
||||
{{/formParams}}
|
||||
final String[] {{localVariablePrefix}}localVarAccepts = {
|
||||
final String[] localVarAccepts = {
|
||||
{{#produces}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/produces}}
|
||||
};
|
||||
final String {{localVariablePrefix}}localVarAccept = {{localVariablePrefix}}apiClient.selectHeaderAccept({{localVariablePrefix}}localVarAccepts);
|
||||
if ({{localVariablePrefix}}localVarAccept != null) {
|
||||
{{localVariablePrefix}}localVarHeaderParams.put("Accept", {{localVariablePrefix}}localVarAccept);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] {{localVariablePrefix}}localVarContentTypes = {
|
||||
final String[] localVarContentTypes = {
|
||||
{{#consumes}}"{{{mediaType}}}"{{#hasMore}}, {{/hasMore}}{{/consumes}}
|
||||
};
|
||||
final String {{localVariablePrefix}}localVarContentType = {{localVariablePrefix}}apiClient.selectHeaderContentType({{localVariablePrefix}}localVarContentTypes);
|
||||
{{localVariablePrefix}}localVarHeaderParams.put("Content-Type", {{localVariablePrefix}}localVarContentType);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] {{localVariablePrefix}}localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||
return {{localVariablePrefix}}apiClient.buildCall({{localVariablePrefix}}localVarPath, "{{httpMethod}}", {{localVariablePrefix}}localVarQueryParams, {{localVariablePrefix}}localVarCollectionQueryParams, {{localVariablePrefix}}localVarPostBody, {{localVariablePrefix}}localVarHeaderParams, {{localVariablePrefix}}localVarFormParams, {{localVariablePrefix}}localVarAuthNames, progressRequestListener);
|
||||
String[] localVarAuthNames = new String[] { {{#authMethods}}"{{name}}"{{#hasMore}}, {{/hasMore}}{{/authMethods}} };
|
||||
return localVarApiClient.buildCall(localVarPath, "{{httpMethod}}", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
{{^performBeanValidation}}
|
||||
{{#allParams}}{{#required}}
|
||||
// verify the required parameter '{{paramName}}' is set
|
||||
@ -153,8 +153,8 @@ public class {{classname}} {
|
||||
}
|
||||
{{/required}}{{/allParams}}
|
||||
|
||||
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener);
|
||||
return {{localVariablePrefix}}call;
|
||||
okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
{{/performBeanValidation}}
|
||||
{{#performBeanValidation}}
|
||||
@ -168,8 +168,8 @@ public class {{classname}} {
|
||||
parameterValues);
|
||||
|
||||
if (violations.size() == 0) {
|
||||
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener);
|
||||
return {{localVariablePrefix}}call;
|
||||
okhttp3.Call localVarCall = {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
} else {
|
||||
throw new BeanValidationException((Set) violations);
|
||||
@ -204,8 +204,8 @@ public class {{classname}} {
|
||||
@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}}
|
||||
{{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
return localVarResp.getData();{{/returnType}}
|
||||
}
|
||||
{{/vendorExtensions.x-group-parameters}}
|
||||
|
||||
@ -227,16 +227,16 @@ public class {{classname}} {
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
|
||||
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
||||
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||
return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType);{{/returnType}}{{^returnType}}return {{localVariablePrefix}}apiClient.execute({{localVariablePrefix}}call);{{/returnType}}
|
||||
okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
|
||||
{{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);{{/returnType}}{{^returnType}}return localVarApiClient.execute(localVarCall);{{/returnType}}
|
||||
}
|
||||
|
||||
{{^vendorExtensions.x-group-parameters}}/**
|
||||
* {{summary}} (asynchronously)
|
||||
* {{notes}}{{#allParams}}
|
||||
* @param {{paramName}} {{description}}{{#required}} (required){{/required}}{{^required}} (optional{{^isContainer}}{{#defaultValue}}, default to {{.}}{{/defaultValue}}{{/isContainer}}){{/required}}{{/allParams}}
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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}}
|
||||
@ -250,45 +250,45 @@ public class {{classname}} {
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException {
|
||||
public{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}private{{/vendorExtensions.x-group-parameters}} okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener);
|
||||
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||
{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}localVarReturnType, {{localVariablePrefix}}callback);{{/returnType}}{{^returnType}}{{localVariablePrefix}}apiClient.executeAsync({{localVariablePrefix}}call, {{localVariablePrefix}}callback);{{/returnType}}
|
||||
return {{localVariablePrefix}}call;
|
||||
okhttp3.Call localVarCall = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
|
||||
{{#returnType}}Type localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);{{/returnType}}{{^returnType}}localVarApiClient.executeAsync(localVarCall, _callback);{{/returnType}}
|
||||
return localVarCall;
|
||||
}
|
||||
{{#vendorExtensions.x-group-parameters}}
|
||||
|
||||
public class API{{operationId}}Request {
|
||||
{{#requiredParams}}
|
||||
private final {{{dataType}}} {{localVariablePrefix}}{{paramName}};
|
||||
private final {{{dataType}}} {{paramName}};
|
||||
{{/requiredParams}}
|
||||
{{#optionalParams}}
|
||||
private {{{dataType}}} {{localVariablePrefix}}{{paramName}};
|
||||
private {{{dataType}}} {{paramName}};
|
||||
{{/optionalParams}}
|
||||
|
||||
private API{{operationId}}Request({{#requiredParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/requiredParams}}) {
|
||||
{{#requiredParams}}
|
||||
this.{{localVariablePrefix}}{{paramName}} = {{paramName}};
|
||||
this.{{paramName}} = {{paramName}};
|
||||
{{/requiredParams}}
|
||||
}
|
||||
|
||||
@ -299,15 +299,15 @@ public class {{classname}} {
|
||||
* @return API{{operationId}}Request
|
||||
*/
|
||||
public API{{operationId}}Request {{paramName}}({{{dataType}}} {{paramName}}) {
|
||||
this.{{localVariablePrefix}}{{paramName}} = {{paramName}};
|
||||
this.{{paramName}} = {{paramName}};
|
||||
return this;
|
||||
}
|
||||
|
||||
{{/optionalParams}}
|
||||
/**
|
||||
* Build call for {{operationId}}
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
{{#isDeprecated}}
|
||||
@ -317,8 +317,8 @@ public class {{classname}} {
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
return {{operationId}}Call({{#allParams}}{{localVariablePrefix}}{{paramName}}, {{/allParams}}progressListener, progressRequestListener);
|
||||
public okhttp3.Call buildCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
return {{operationId}}Call({{#allParams}}{{paramName}}, {{/allParams}}_progressListener, _progressRequestListener);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -333,8 +333,8 @@ public class {{classname}} {
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}} execute() throws ApiException {
|
||||
{{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
return {{localVariablePrefix}}resp.getData();{{/returnType}}
|
||||
{{#returnType}}ApiResponse<{{{returnType}}}> localVarResp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});{{#returnType}}
|
||||
return localVarResp.getData();{{/returnType}}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -349,12 +349,12 @@ public class {{classname}} {
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> executeWithHttpInfo() throws ApiException {
|
||||
return {{operationId}}WithHttpInfo({{#allParams}}{{localVariablePrefix}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
return {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
|
||||
}
|
||||
|
||||
/**
|
||||
* Execute {{operationId}} request (asynchronously)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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}}
|
||||
@ -364,8 +364,8 @@ public class {{classname}} {
|
||||
{{#isDeprecated}}
|
||||
@Deprecated
|
||||
{{/isDeprecated}}
|
||||
public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> callback) throws ApiException {
|
||||
return {{operationId}}Async({{#allParams}}{{localVariablePrefix}}{{paramName}}, {{/allParams}}callback);
|
||||
public okhttp3.Call executeAsync(final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> _callback) throws ApiException {
|
||||
return {{operationId}}Async({{#allParams}}{{paramName}}, {{/allParams}}_callback);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -36,33 +36,33 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AnotherFakeApi {
|
||||
private ApiClient apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public AnotherFakeApi() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public AnotherFakeApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for call123testSpecialTags
|
||||
* @param body client model (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -75,7 +75,7 @@ public class AnotherFakeApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -83,27 +83,27 @@ public class AnotherFakeApi {
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -111,8 +111,8 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = call123testSpecialTagsCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -124,8 +124,8 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Client call123testSpecialTags(Client body) throws ApiException {
|
||||
ApiResponse<Client> resp = call123testSpecialTagsWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
ApiResponse<Client> localVarResp = call123testSpecialTagsWithHttpInfo(body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,43 +136,43 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags (asynchronously)
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> callback) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,33 +36,33 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FakeClassnameTags123Api {
|
||||
private ApiClient apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public FakeClassnameTags123Api() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public FakeClassnameTags123Api(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for testClassname
|
||||
* @param body client model (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call testClassnameCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call testClassnameCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -75,7 +75,7 @@ public class FakeClassnameTags123Api {
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -83,27 +83,27 @@ public class FakeClassnameTags123Api {
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -111,8 +111,8 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = testClassnameCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -124,8 +124,8 @@ public class FakeClassnameTags123Api {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Client testClassname(Client body) throws ApiException {
|
||||
ApiResponse<Client> resp = testClassnameWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
ApiResponse<Client> localVarResp = testClassnameWithHttpInfo(body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,43 +136,43 @@ public class FakeClassnameTags123Api {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call call = testClassnameValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case (asynchronously)
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> callback) throws ApiException {
|
||||
public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = testClassnameValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,38 +36,38 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public StoreApi() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for deleteOrder
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{order_id}"
|
||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||
.replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
@ -76,7 +76,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -84,27 +84,27 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -112,8 +112,8 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -135,51 +135,51 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, null, null);
|
||||
return apiClient.execute(call);
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID (asynchronously)
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> callback) throws ApiException {
|
||||
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getInventory
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getInventoryCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@ -192,7 +192,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -200,31 +200,31 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
|
||||
okhttp3.Call call = getInventoryCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -235,8 +235,8 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Map<String, Integer> getInventory() throws ApiException {
|
||||
ApiResponse<Map<String, Integer>> resp = getInventoryWithHttpInfo();
|
||||
return resp.getData();
|
||||
ApiResponse<Map<String, Integer>> localVarResp = getInventoryWithHttpInfo();
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -246,58 +246,58 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call call = getInventoryValidateBeforeCall(null, null);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status (asynchronously)
|
||||
* Returns a map of status codes to quantities
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> callback) throws ApiException {
|
||||
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = getInventoryValidateBeforeCall(progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getOrderById
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{order_id}"
|
||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||
.replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
@ -306,7 +306,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -314,27 +314,27 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -342,8 +342,8 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -355,8 +355,8 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Order getOrderById(Long orderId) throws ApiException {
|
||||
ApiResponse<Order> resp = getOrderByIdWithHttpInfo(orderId);
|
||||
return resp.getData();
|
||||
ApiResponse<Order> localVarResp = getOrderByIdWithHttpInfo(orderId);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -367,54 +367,54 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, null, null);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID (asynchronously)
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> callback) throws ApiException {
|
||||
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for placeOrder
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -427,7 +427,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -435,27 +435,27 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -463,8 +463,8 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = placeOrderCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -476,8 +476,8 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Order placeOrder(Order body) throws ApiException {
|
||||
ApiResponse<Order> resp = placeOrderWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
ApiResponse<Order> localVarResp = placeOrderWithHttpInfo(body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -488,43 +488,43 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
okhttp3.Call call = placeOrderValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet (asynchronously)
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> callback) throws ApiException {
|
||||
public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = placeOrderValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,33 +36,33 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class AnotherFakeApi {
|
||||
private ApiClient apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public AnotherFakeApi() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public AnotherFakeApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for call123testSpecialTags
|
||||
* @param body client model (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -75,7 +75,7 @@ public class AnotherFakeApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -83,27 +83,27 @@ public class AnotherFakeApi {
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call call123testSpecialTagsValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -111,8 +111,8 @@ public class AnotherFakeApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = call123testSpecialTagsCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsCall(body, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -124,8 +124,8 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Client call123testSpecialTags(Client body) throws ApiException {
|
||||
ApiResponse<Client> resp = call123testSpecialTagsWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
ApiResponse<Client> localVarResp = call123testSpecialTagsWithHttpInfo(body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,43 +136,43 @@ public class AnotherFakeApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> call123testSpecialTagsWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, null, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test special tags (asynchronously)
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param body client model (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> callback) throws ApiException {
|
||||
public okhttp3.Call call123testSpecialTagsAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = call123testSpecialTagsValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = call123testSpecialTagsValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,33 +36,33 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class FakeClassnameTags123Api {
|
||||
private ApiClient apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public FakeClassnameTags123Api() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public FakeClassnameTags123Api(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for testClassname
|
||||
* @param body client model (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call testClassnameCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call testClassnameCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -75,7 +75,7 @@ public class FakeClassnameTags123Api {
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -83,27 +83,27 @@ public class FakeClassnameTags123Api {
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call testClassnameValidateBeforeCall(Client body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -111,8 +111,8 @@ public class FakeClassnameTags123Api {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = testClassnameCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = testClassnameCall(body, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -124,8 +124,8 @@ public class FakeClassnameTags123Api {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Client testClassname(Client body) throws ApiException {
|
||||
ApiResponse<Client> resp = testClassnameWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
ApiResponse<Client> localVarResp = testClassnameWithHttpInfo(body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -136,43 +136,43 @@ public class FakeClassnameTags123Api {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Client> testClassnameWithHttpInfo(Client body) throws ApiException {
|
||||
okhttp3.Call call = testClassnameValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, null, null);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* To test class name in snake case (asynchronously)
|
||||
* To test class name in snake case
|
||||
* @param body client model (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> callback) throws ApiException {
|
||||
public okhttp3.Call testClassnameAsync(Client body, final ApiCallback<Client> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = testClassnameValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = testClassnameValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Client>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -36,38 +36,38 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public class StoreApi {
|
||||
private ApiClient apiClient;
|
||||
private ApiClient localVarApiClient;
|
||||
|
||||
public StoreApi() {
|
||||
this(Configuration.getDefaultApiClient());
|
||||
}
|
||||
|
||||
public StoreApi(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
public ApiClient getApiClient() {
|
||||
return apiClient;
|
||||
return localVarApiClient;
|
||||
}
|
||||
|
||||
public void setApiClient(ApiClient apiClient) {
|
||||
this.apiClient = apiClient;
|
||||
this.localVarApiClient = apiClient;
|
||||
}
|
||||
|
||||
/**
|
||||
* Build call for deleteOrder
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call deleteOrderCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{order_id}"
|
||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||
.replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
@ -76,7 +76,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -84,27 +84,27 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call deleteOrderValidateBeforeCall(String orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -112,8 +112,8 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = deleteOrderCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = deleteOrderCall(orderId, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -135,51 +135,51 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Void> deleteOrderWithHttpInfo(String orderId) throws ApiException {
|
||||
okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, null, null);
|
||||
return apiClient.execute(call);
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, null, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete purchase order by ID (asynchronously)
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param orderId ID of the order that needs to be deleted (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> callback) throws ApiException {
|
||||
public okhttp3.Call deleteOrderAsync(String orderId, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = deleteOrderValidateBeforeCall(orderId, progressListener, progressRequestListener);
|
||||
apiClient.executeAsync(call, callback);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = deleteOrderValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getInventory
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getInventoryCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getInventoryCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
@ -192,7 +192,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -200,31 +200,31 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { "api_key" };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getInventoryValidateBeforeCall(final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
|
||||
okhttp3.Call call = getInventoryCall(progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = getInventoryCall(_progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -235,8 +235,8 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Map<String, Integer> getInventory() throws ApiException {
|
||||
ApiResponse<Map<String, Integer>> resp = getInventoryWithHttpInfo();
|
||||
return resp.getData();
|
||||
ApiResponse<Map<String, Integer>> localVarResp = getInventoryWithHttpInfo();
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -246,58 +246,58 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Map<String, Integer>> getInventoryWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call call = getInventoryValidateBeforeCall(null, null);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(null, null);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns pet inventories by status (asynchronously)
|
||||
* Returns a map of status codes to quantities
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> callback) throws ApiException {
|
||||
public okhttp3.Call getInventoryAsync(final ApiCallback<Map<String, Integer>> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = getInventoryValidateBeforeCall(progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = getInventoryValidateBeforeCall(_progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Map<String, Integer>>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for getOrderById
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call getOrderByIdCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/store/order/{order_id}"
|
||||
.replaceAll("\\{" + "order_id" + "\\}", apiClient.escapeString(orderId.toString()));
|
||||
.replaceAll("\\{" + "order_id" + "\\}", localVarApiClient.escapeString(orderId.toString()));
|
||||
|
||||
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||
@ -306,7 +306,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -314,27 +314,27 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call getOrderByIdValidateBeforeCall(Long orderId, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
if (orderId == null) {
|
||||
@ -342,8 +342,8 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = getOrderByIdCall(orderId, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = getOrderByIdCall(orderId, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -355,8 +355,8 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Order getOrderById(Long orderId) throws ApiException {
|
||||
ApiResponse<Order> resp = getOrderByIdWithHttpInfo(orderId);
|
||||
return resp.getData();
|
||||
ApiResponse<Order> localVarResp = getOrderByIdWithHttpInfo(orderId);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -367,54 +367,54 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> getOrderByIdWithHttpInfo(Long orderId) throws ApiException {
|
||||
okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, null, null);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, null, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Find purchase order by ID (asynchronously)
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param orderId ID of pet that needs to be fetched (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> callback) throws ApiException {
|
||||
public okhttp3.Call getOrderByIdAsync(Long orderId, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = getOrderByIdValidateBeforeCall(orderId, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = getOrderByIdValidateBeforeCall(orderId, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for placeOrder
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param progressListener Progress listener
|
||||
* @param progressRequestListener Progress request listener
|
||||
* @param _progressListener Progress listener
|
||||
* @param _progressRequestListener Progress request listener
|
||||
* @return Call to execute
|
||||
* @throws ApiException If fail to serialize the request body object
|
||||
*/
|
||||
public okhttp3.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
public okhttp3.Call placeOrderCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
@ -427,7 +427,7 @@ public class StoreApi {
|
||||
final String[] localVarAccepts = {
|
||||
"application/xml", "application/json"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
@ -435,27 +435,27 @@ public class StoreApi {
|
||||
final String[] localVarContentTypes = {
|
||||
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
|
||||
if (progressListener != null) {
|
||||
apiClient.setHttpClient(apiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
if (_progressListener != null) {
|
||||
localVarApiClient.setHttpClient(localVarApiClient.getHttpClient().newBuilder().addNetworkInterceptor(new okhttp3.Interceptor() {
|
||||
@Override
|
||||
public okhttp3.Response intercept(okhttp3.Interceptor.Chain chain) throws IOException {
|
||||
okhttp3.Response originalResponse = chain.proceed(chain.request());
|
||||
return originalResponse.newBuilder()
|
||||
.body(new ProgressResponseBody(originalResponse.body(), progressListener))
|
||||
.body(new ProgressResponseBody(originalResponse.body(), _progressListener))
|
||||
.build();
|
||||
}
|
||||
}).build());
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _progressRequestListener);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
|
||||
private okhttp3.Call placeOrderValidateBeforeCall(Order body, final ProgressResponseBody.ProgressListener _progressListener, final ProgressRequestBody.ProgressRequestListener _progressRequestListener) throws ApiException {
|
||||
|
||||
// verify the required parameter 'body' is set
|
||||
if (body == null) {
|
||||
@ -463,8 +463,8 @@ public class StoreApi {
|
||||
}
|
||||
|
||||
|
||||
okhttp3.Call call = placeOrderCall(body, progressListener, progressRequestListener);
|
||||
return call;
|
||||
okhttp3.Call localVarCall = placeOrderCall(body, _progressListener, _progressRequestListener);
|
||||
return localVarCall;
|
||||
|
||||
}
|
||||
|
||||
@ -476,8 +476,8 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public Order placeOrder(Order body) throws ApiException {
|
||||
ApiResponse<Order> resp = placeOrderWithHttpInfo(body);
|
||||
return resp.getData();
|
||||
ApiResponse<Order> localVarResp = placeOrderWithHttpInfo(body);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -488,43 +488,43 @@ public class StoreApi {
|
||||
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||
*/
|
||||
public ApiResponse<Order> placeOrderWithHttpInfo(Order body) throws ApiException {
|
||||
okhttp3.Call call = placeOrderValidateBeforeCall(body, null, null);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, null, null);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
return apiClient.execute(call, localVarReturnType);
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Place an order for a pet (asynchronously)
|
||||
*
|
||||
* @param body order placed for purchasing the pet (required)
|
||||
* @param callback The callback to be executed when the API call finishes
|
||||
* @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 okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> callback) throws ApiException {
|
||||
public okhttp3.Call placeOrderAsync(Order body, final ApiCallback<Order> _callback) throws ApiException {
|
||||
|
||||
ProgressResponseBody.ProgressListener progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
|
||||
ProgressResponseBody.ProgressListener _progressListener = null;
|
||||
ProgressRequestBody.ProgressRequestListener _progressRequestListener = null;
|
||||
|
||||
if (callback != null) {
|
||||
progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
if (_callback != null) {
|
||||
_progressListener = new ProgressResponseBody.ProgressListener() {
|
||||
@Override
|
||||
public void update(long bytesRead, long contentLength, boolean done) {
|
||||
callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
_callback.onDownloadProgress(bytesRead, contentLength, done);
|
||||
}
|
||||
};
|
||||
|
||||
progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
_progressRequestListener = new ProgressRequestBody.ProgressRequestListener() {
|
||||
@Override
|
||||
public void onRequestProgress(long bytesWritten, long contentLength, boolean done) {
|
||||
callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
_callback.onUploadProgress(bytesWritten, contentLength, done);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
okhttp3.Call call = placeOrderValidateBeforeCall(body, progressListener, progressRequestListener);
|
||||
okhttp3.Call localVarCall = placeOrderValidateBeforeCall(body, _progressListener, _progressRequestListener);
|
||||
Type localVarReturnType = new TypeToken<Order>(){}.getType();
|
||||
apiClient.executeAsync(call, localVarReturnType, callback);
|
||||
return call;
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user