From a7d20b0bf07367ac2cbba1c28351d2b305db11c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20=C5=A0lapa?= Date: Mon, 10 Feb 2020 14:59:20 +0100 Subject: [PATCH] Fix for #5262 [BUG][typescript-axios] missing discriminator --- .../main/resources/typescript-axios/modelGeneric.mustache | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache index ebe734cefb2..eac42428ede 100644 --- a/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-axios/modelGeneric.mustache @@ -8,6 +8,14 @@ export interface {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ [key: string]: {{{additionalPropertiesType}}}{{#hasVars}} | any{{/hasVars}}; {{/additionalPropertiesType}} +{{#discriminator}} + /** + * Discriminator + * @type {string} + * @memberof {{classname}} + */ + '{{propertyBaseName}}': string; +{{/discriminator}} {{#vars}} /** * {{{description}}}