diff --git a/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache b/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache index 58cd4b31bf1..bbf1ef66c9b 100644 --- a/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache +++ b/modules/swagger-codegen/src/main/resources/typescript-node/api.mustache @@ -145,10 +145,10 @@ export class {{classname}} {{#parent}}extends {{{parent}}} {{/parent}}{ {{/vars}} {{#discriminator}} - static discriminator = {{discriminator}}; + static discriminator = '{{discriminator}}'; {{/discriminator}} {{^discriminator}} - static discriminator = undefined; + static discriminator: string = undefined; {{/discriminator}} static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ diff --git a/samples/client/petstore/typescript-node/default/.swagger-codegen/VERSION b/samples/client/petstore/typescript-node/default/.swagger-codegen/VERSION index a6254504e40..855ff9501eb 100644 --- a/samples/client/petstore/typescript-node/default/.swagger-codegen/VERSION +++ b/samples/client/petstore/typescript-node/default/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.1 \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/default/api.ts b/samples/client/petstore/typescript-node/default/api.ts index 1e75275a066..963cdc0717a 100644 --- a/samples/client/petstore/typescript-node/default/api.ts +++ b/samples/client/petstore/typescript-node/default/api.ts @@ -144,7 +144,7 @@ export class ApiResponse { 'type': string; 'message': string; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -175,7 +175,7 @@ export class Category { 'id': number; 'name': string; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -208,7 +208,7 @@ export class Order { 'status': Order.StatusEnum; 'complete': boolean; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -268,7 +268,7 @@ export class Pet { */ 'status': Pet.StatusEnum; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -321,7 +321,7 @@ export class Tag { 'id': number; 'name': string; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -356,7 +356,7 @@ export class User { */ 'userStatus': number; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -1507,7 +1507,7 @@ export class UserApi { /** * * @summary Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : Promise<{ response: http.ClientResponse; body: User; }> { const localVarPath = this.basePath + '/user/{username}' diff --git a/samples/client/petstore/typescript-node/npm/.swagger-codegen/VERSION b/samples/client/petstore/typescript-node/npm/.swagger-codegen/VERSION index a6254504e40..855ff9501eb 100644 --- a/samples/client/petstore/typescript-node/npm/.swagger-codegen/VERSION +++ b/samples/client/petstore/typescript-node/npm/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.1 \ No newline at end of file +2.4.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-node/npm/api.ts b/samples/client/petstore/typescript-node/npm/api.ts index 1e75275a066..963cdc0717a 100644 --- a/samples/client/petstore/typescript-node/npm/api.ts +++ b/samples/client/petstore/typescript-node/npm/api.ts @@ -144,7 +144,7 @@ export class ApiResponse { 'type': string; 'message': string; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -175,7 +175,7 @@ export class Category { 'id': number; 'name': string; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -208,7 +208,7 @@ export class Order { 'status': Order.StatusEnum; 'complete': boolean; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -268,7 +268,7 @@ export class Pet { */ 'status': Pet.StatusEnum; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -321,7 +321,7 @@ export class Tag { 'id': number; 'name': string; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -356,7 +356,7 @@ export class User { */ 'userStatus': number; - static discriminator = undefined; + static discriminator: string = undefined; static attributeTypeMap: Array<{name: string, baseName: string, type: string}> = [ { @@ -1507,7 +1507,7 @@ export class UserApi { /** * * @summary Get user by user name - * @param username The name that needs to be fetched. Use user1 for testing. + * @param username The name that needs to be fetched. Use user1 for testing. */ public getUserByName (username: string) : Promise<{ response: http.ClientResponse; body: User; }> { const localVarPath = this.basePath + '/user/{username}'