From 1f0eb0c4b164e80b99549bc86744dd741543ba3e Mon Sep 17 00:00:00 2001 From: "louis.pujol" Date: Thu, 12 Nov 2020 15:03:46 -0600 Subject: [PATCH 1/3] remove empty lines for operation parameters --- templates/operationParameters.handlebars | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/templates/operationParameters.handlebars b/templates/operationParameters.handlebars index 94443a3..bb1b30e 100644 --- a/templates/operationParameters.handlebars +++ b/templates/operationParameters.handlebars @@ -1,5 +1,9 @@ params{{^operation.parametersRequired}}?{{/operation.parametersRequired}}: { -{{#operation.parameters}}{{tsComments}}{{{var}}}{{^required}}?{{/required}}: {{{type}}};{{#tsComments}} -{{/tsComments}}{{/operation.parameters}}{{#requestBody}} {{{../operation.requestBody.tsComments}}}body{{^../operation.requestBody.required}}?{{/../operation.requestBody.required - }}: {{{type}}}{{/requestBody}} +{{#operation.parameters}} +{{tsComments}}{{{var}}}{{^required}}?{{/required}}: {{{type}}};{{#tsComments}}{{/tsComments}} +{{/operation.parameters}} +{{#requestBody}} +{{{../operation.requestBody.tsComments}}}body{{^../operation.requestBody.required}}?{{/../operation.requestBody.required +}}: {{{type}}} +{{/requestBody}} } \ No newline at end of file From 5b7cc719f748c0a54131757e184fc927df74f31e Mon Sep 17 00:00:00 2001 From: "louis.pujol" Date: Thu, 12 Nov 2020 15:04:18 -0600 Subject: [PATCH 2/3] remove empty lines in if(params) block --- templates/operationResponse.handlebars | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/operationResponse.handlebars b/templates/operationResponse.handlebars index a7b3b66..28c30c4 100644 --- a/templates/operationResponse.handlebars +++ b/templates/operationResponse.handlebars @@ -2,11 +2,9 @@ const rb = new {{@root.requestBuilderClass}}(this.rootUrl, {{@root.typeName}}.{{operation.pathVar}}, '{{operation.method}}'); if (params) { - {{#operation.parameters}} rb.{{in}}('{{{name}}}', params{{{varAccess}}}, {{{parameterOptions}}}); {{/operation.parameters}} - {{#requestBody}} rb.body(params.body, '{{{mediaType}}}'); {{/requestBody}} From 253fdbfbe01cb8ef93edb08989794394cd59ce80 Mon Sep 17 00:00:00 2001 From: "louis.pujol" Date: Thu, 12 Nov 2020 15:04:38 -0600 Subject: [PATCH 3/3] add empty line between if params block and request block --- templates/operationResponse.handlebars | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/operationResponse.handlebars b/templates/operationResponse.handlebars index 28c30c4..5c06059 100644 --- a/templates/operationResponse.handlebars +++ b/templates/operationResponse.handlebars @@ -9,6 +9,7 @@ rb.body(params.body, '{{{mediaType}}}'); {{/requestBody}} } + return this.http.request(rb.build({ responseType: '{{responseType}}', accept: '{{accept}}'