Skip to content

Commit 4f1b0d8

Browse files
authored
Updated mustache templates (#704)
1 parent d22a7ac commit 4f1b0d8

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

boat-scaffold/src/main/templates/boat-android/api_operation_parameter_model.mustache

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@
88
*/
99
{{#hasParams}}@DataApi {{/hasParams}}class {{{operationIdCamelCase}}} internal constructor(
1010
{{#allParams}}
11+
{{#isModel}}
12+
val {{{paramName}}}: {{modelPackage}}.{{{dataType}}}{{^required}}? = null{{/required}},{{/isModel}} {{^isModel}}
13+
val {{{paramName}}}: {{{dataType}}}{{^required}}? = null{{/required}}, {{/isModel}}
1114

12-
val {{{paramName}}}: {{{dataType}}}{{^required}}? = null{{/required}},
1315

1416
{{#isMultipart}}
1517
{{#isFormParam}}
@@ -35,7 +37,9 @@
3537
3638
class Builder {
3739
{{#allParams}}
38-
var {{{paramName}}}: {{{dataType}}}? = null
40+
{{#isModel}}
41+
var {{{paramName}}}: {{modelPackage}}.{{{dataType}}}? = null {{/isModel}} {{^isModel}}
42+
var {{{paramName}}}: {{{dataType}}}? = null {{/isModel}}
3943
{{#isMultipart}}
4044
{{#isFormParam}}
4145
{{^isFile}}
@@ -92,4 +96,4 @@
9296
@JvmSynthetic // Hide from Java callers who should use Builder
9397
fun {{{operationIdCamelCase}}}(initializer: {{{operationIdCamelCase}}}.Builder.() -> Unit): {{{operationIdCamelCase}}} {
9498
return {{{operationIdCamelCase}}}.Builder().apply(initializer).build()
95-
}
99+
}

0 commit comments

Comments
 (0)