Skip to content

Commit

Permalink
Merge pull request #978 from Backbase/android-template-enhancement
Browse files Browse the repository at this point in the history
  • Loading branch information
bartveenstra authored Dec 30, 2024
2 parents 1ef0f10 + 759a457 commit aacf253
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
11 changes: 7 additions & 4 deletions boat-scaffold/src/main/templates/boat-android/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{#queryParams}}

if (params.{{{paramName}}} != null) {
queryParams["{{{paramName}}}"] =
queryParams["{{{baseName}}}"] =
{{#isContainer}}
{{#isExplode}}
//explode=true
Expand Down

0 comments on commit aacf253

Please sign in to comment.