diff --git a/openapi-generator/templates/java/libraries/okhttp-gson/api.mustache b/openapi-generator/templates/java/libraries/okhttp-gson/api.mustache index c4a6a213..6481de25 100644 --- a/openapi-generator/templates/java/libraries/okhttp-gson/api.mustache +++ b/openapi-generator/templates/java/libraries/okhttp-gson/api.mustache @@ -100,12 +100,12 @@ public class {{classname}} { {{javaUtilPrefix}}List localVarCollectionQueryParams = new {{javaUtilPrefix}}ArrayList(); {{#queryParams}} if ({{paramName}} != null) { - {{#isMap}} + {{#isDeepObject}} localVarQueryParams.addAll(localVarApiClient.mappedParameterToPairs("{{baseName}}", {{paramName}})); - {{/isMap}} - {{^isMap}} + {{/isDeepObject}} + {{^isDeepObject}} {{#collectionFormat}}localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("{{{collectionFormat}}}", {{/collectionFormat}}{{^collectionFormat}}localVarQueryParams.addAll(localVarApiClient.parameterToPair({{/collectionFormat}}"{{baseName}}", {{paramName}})); - {{/isMap}} + {{/isDeepObject}} } {{/queryParams}}