From 1b8dae18b8f30a5dd075fd618050b1e73bc17ae4 Mon Sep 17 00:00:00 2001 From: Ran Halprin Date: Thu, 17 Feb 2022 08:47:28 -0800 Subject: [PATCH] typescript-fetch: Support deprecated parameters, operations (#11523) Co-authored-by: Ran Halprin --- .../src/main/resources/typescript-fetch/apis.mustache | 3 +++ .../resources/typescript-fetch/modelGenericInterfaces.mustache | 3 +++ 2 files changed, 6 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache index bbdf2edf4a3..a34af7338dc 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/apis.mustache @@ -46,6 +46,9 @@ export interface {{classname}}Interface { * @param {{=<% %>=}}{<%&dataType%>}<%={{ }}=%> {{^required}}[{{/required}}{{paramName}}{{^required}}]{{/required}} {{description}} {{/allParams}} * @param {*} [options] Override http request option. + {{#isDeprecated}} + * @deprecated + {{/isDeprecated}} * @throws {RequiredError} * @memberof {{classname}}Interface */ diff --git a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache index c2b7823f7c2..f75eb0a0c5f 100644 --- a/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-fetch/modelGenericInterfaces.mustache @@ -12,6 +12,9 @@ export interface {{classname}} {{#parent}}extends {{{.}}} {{/parent}}{ * {{#lambda.indented_star_4}}{{{unescapedDescription}}}{{/lambda.indented_star_4}} * @type {{=<% %>=}}{<%&datatype%>}<%={{ }}=%> * @memberof {{classname}} + {{#deprecated}} + * @deprecated + {{/deprecated}} */ {{#isReadOnly}}readonly {{/isReadOnly}}{{name}}{{^required}}?{{/required}}: {{#isEnum}}{{{datatypeWithEnum}}}{{/isEnum}}{{^isEnum}}{{{datatype}}}{{#isNullable}} | null{{/isNullable}}{{/isEnum}}; {{/vars}}