From 64624b240a7190aeed19af548788a6f24a331e3d Mon Sep 17 00:00:00 2001 From: Matt Lilley Date: Thu, 5 Nov 2020 13:33:55 +0000 Subject: [PATCH] Correctly document params when useOptions is set --- src/templates/exportService.hbs | 12 +++++++----- src/templates/partials/parameters.hbs | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/templates/exportService.hbs b/src/templates/exportService.hbs index 10cf87f7..88bdc217 100644 --- a/src/templates/exportService.hbs +++ b/src/templates/exportService.hbs @@ -23,11 +23,13 @@ export class {{{name}}} { {{#if description}} * {{{description}}} {{/if}} - {{#if parameters}} - {{#each parameters}} - * @param {{{name}}} {{{description}}} - {{/each}} - {{/if}} + {{#unless @root.useOptions}} + {{#if parameters}} + {{#each parameters}} + * @param {{{name}}} {{{description}}} + {{/each}} + {{/if}} + {{/unless}} {{#each results}} * @result {{{type}}} {{{description}}} {{/each}} diff --git a/src/templates/partials/parameters.hbs b/src/templates/partials/parameters.hbs index 4c16b47c..98377752 100644 --- a/src/templates/partials/parameters.hbs +++ b/src/templates/partials/parameters.hbs @@ -6,6 +6,7 @@ {{/each}} }: { {{#each parameters}} +/** {{{description}}} */ {{{name}}}{{>isRequired}}: {{>type}}, {{/each}} }