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 ae81a0f8a..d790222b7 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 @@ -8,8 +8,10 @@ */ {{#hasParams}}@DataApi {{/hasParams}}class {{{operationIdCamelCase}}} internal constructor( {{#allParams}} + {{#isModel}} + val {{{paramName}}}: {{modelPackage}}.{{{dataType}}}{{^required}}? = null{{/required}},{{/isModel}} {{^isModel}} + val {{{paramName}}}: {{{dataType}}}{{^required}}? = null{{/required}}, {{/isModel}} - val {{{paramName}}}: {{{dataType}}}{{^required}}? = null{{/required}}, {{#isMultipart}} {{#isFormParam}} @@ -35,7 +37,9 @@ class Builder { {{#allParams}} - var {{{paramName}}}: {{{dataType}}}? = null + {{#isModel}} + var {{{paramName}}}: {{modelPackage}}.{{{dataType}}}? = null {{/isModel}} {{^isModel}} + var {{{paramName}}}: {{{dataType}}}? = null {{/isModel}} {{#isMultipart}} {{#isFormParam}} {{^isFile}} @@ -92,4 +96,4 @@ @JvmSynthetic // Hide from Java callers who should use Builder fun {{{operationIdCamelCase}}}(initializer: {{{operationIdCamelCase}}}.Builder.() -> Unit): {{{operationIdCamelCase}}} { return {{{operationIdCamelCase}}}.Builder().apply(initializer).build() -} \ No newline at end of file +}