diff --git a/boat-scaffold/src/main/templates/boat-android/api.mustache b/boat-scaffold/src/main/templates/boat-android/api.mustache index 34762491f..ccafb67ff 100644 --- a/boat-scaffold/src/main/templates/boat-android/api.mustache +++ b/boat-scaffold/src/main/templates/boat-android/api.mustache @@ -111,12 +111,15 @@ class {{classname}}( } {{/isFile}} {{/formParams}} - - {{#isListContainer}} - return MultipartCall<{{{returnType}}}>(request, multiPartWrapper, parser, Types.newParameterizedType(List::class.java, {{{returnBaseType}}}::class.java)) - {{/isListContainer}} + {{#isListContainer}}return MultipartCall<{{{returnType}}}>(request, multiPartWrapper, parser, Types.newParameterizedType(List::class.java, {{{returnBaseType}}}::class.java)){{/isListContainer}} {{^isListContainer}} + {{#isArray}}return MultipartCall<{{{returnType}}}>(request, multiPartWrapper, parser, Types.newParameterizedType(List::class.java, {{{returnBaseType}}}::class.java)){{/isArray}} + {{^isArray}} + {{#uniqueItems}} return MultipartCall<{{{returnType}}}>(request, multiPartWrapper, parser, Types.newParameterizedType(Set::class.java, {{{returnBaseType}}}::class.java)){{/uniqueItems}} + {{^uniqueItems}} return MultipartCall<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}>(request, multiPartWrapper, parser, {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Unit{{/returnType}}::class.java) + {{/uniqueItems}} + {{/isArray}} {{/isListContainer}} {{/isMultipart}} } diff --git a/boat-scaffold/src/main/templates/boat-android/api_operation_parameter_model.mustache b/boat-scaffold/src/main/templates/boat-android/api_operation_parameter_model.mustache index 7aeb5a451..f770a94c7 100644 --- a/boat-scaffold/src/main/templates/boat-android/api_operation_parameter_model.mustache +++ b/boat-scaffold/src/main/templates/boat-android/api_operation_parameter_model.mustache @@ -24,7 +24,7 @@ {{#isFile}} {{^isContainer}} val {{{paramName}}}FileName: String{{^required}}? = null{{/required}}, - val {{{paramName}}}ContentType: String{{^required}}? = null{{/required}} + val {{{paramName}}}ContentType: String{{^required}}? = null{{/required}}, {{/isContainer}} {{#isContainer}} diff --git a/boat-scaffold/src/main/templates/boat-android/queryParams.mustache b/boat-scaffold/src/main/templates/boat-android/queryParams.mustache index 6380ae769..95ba1b3cb 100644 --- a/boat-scaffold/src/main/templates/boat-android/queryParams.mustache +++ b/boat-scaffold/src/main/templates/boat-android/queryParams.mustache @@ -1,7 +1,7 @@ {{#queryParams}} if (params.{{{paramName}}} != null) { - queryParams["{{{paramName}}}"] = + queryParams["{{{baseName}}}"] = {{#isContainer}} {{#isExplode}} //explode=true