From 0a479f77f661f9947058c08fcb496c0fe5841c0e Mon Sep 17 00:00:00 2001 From: Esteban Marin Date: Mon, 11 Jun 2018 15:31:23 +0200 Subject: [PATCH] [typescript-angular] strict type checking (#218) * strict type checking * strict type checking * generate samples for angular-typescript --- .../typescript-angular/api.service.mustache | 4 ++-- .../typescript-angular/configuration.mustache | 6 ++--- .../default/.openapi-generator/VERSION | 2 +- .../default/api/pet.service.ts | 20 ++++++++-------- .../default/api/store.service.ts | 10 ++++---- .../default/api/user.service.ts | 24 +++++++++---------- .../default/configuration.ts | 6 ++--- .../npm/.openapi-generator/VERSION | 2 +- .../npm/api/pet.service.ts | 20 ++++++++-------- .../npm/api/store.service.ts | 10 ++++---- .../npm/api/user.service.ts | 24 +++++++++---------- .../npm/configuration.ts | 6 ++--- .../.openapi-generator/VERSION | 2 +- .../with-interfaces/api/pet.service.ts | 20 ++++++++-------- .../with-interfaces/api/store.service.ts | 10 ++++---- .../with-interfaces/api/user.service.ts | 24 +++++++++---------- .../with-interfaces/configuration.ts | 6 ++--- .../npm/.openapi-generator/VERSION | 2 +- .../npm/api/pet.service.ts | 20 ++++++++-------- .../npm/api/store.service.ts | 10 ++++---- .../npm/api/user.service.ts | 24 +++++++++---------- .../npm/configuration.ts | 6 ++--- .../npm/.openapi-generator/VERSION | 2 +- .../npm/api/pet.service.ts | 20 ++++++++-------- .../npm/api/store.service.ts | 10 ++++---- .../npm/api/user.service.ts | 24 +++++++++---------- .../npm/configuration.ts | 6 ++--- .../default/.openapi-generator/VERSION | 2 +- .../default/api/pet.service.ts | 20 ++++++++-------- .../default/api/store.service.ts | 10 ++++---- .../default/api/user.service.ts | 24 +++++++++---------- .../default/configuration.ts | 6 ++--- .../default/.openapi-generator/VERSION | 2 +- .../default/api/pet.service.ts | 20 ++++++++-------- .../default/api/store.service.ts | 10 ++++---- .../default/api/user.service.ts | 24 +++++++++---------- .../default/configuration.ts | 6 ++--- 37 files changed, 222 insertions(+), 222 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache index f01aa426afb3..106f7127e231 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/api.service.mustache @@ -226,7 +226,7 @@ export class {{classname}} { {{/produces}} ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { {{^useHttpClient}} headers.set('Accept', httpHeaderAcceptSelected); {{/useHttpClient}} @@ -243,7 +243,7 @@ export class {{classname}} { ]; {{#bodyParam}} const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { {{^useHttpClient}} headers.set('Content-Type', httpContentTypeSelected); {{/useHttpClient}} diff --git a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache index 82e8458f39e1..5dac1323937e 100644 --- a/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache +++ b/modules/openapi-generator/src/main/resources/typescript-angular/configuration.mustache @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts index 3cfcd08d1d1a..f6c95294851a 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/pet.service.ts @@ -217,7 +217,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -227,7 +227,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -274,7 +274,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -327,7 +327,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -381,7 +381,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -427,7 +427,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -473,7 +473,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -483,7 +483,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -528,7 +528,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -601,7 +601,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts index 931ab9c37121..847b5deb8b04 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/store.service.ts @@ -138,7 +138,7 @@ export class StoreService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -178,7 +178,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -218,7 +218,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -258,7 +258,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -266,7 +266,7 @@ export class StoreService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts index 59afd0e25e59..7753232bf2fd 100644 --- a/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/default/api/user.service.ts @@ -204,7 +204,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -212,7 +212,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -247,7 +247,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -255,7 +255,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -290,7 +290,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -298,7 +298,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -333,7 +333,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -373,7 +373,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -425,7 +425,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -460,7 +460,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -502,7 +502,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -510,7 +510,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/default/configuration.ts b/samples/client/petstore/typescript-angular-v2/default/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v2/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v2/default/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts index 3cfcd08d1d1a..f6c95294851a 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/pet.service.ts @@ -217,7 +217,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -227,7 +227,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -274,7 +274,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -327,7 +327,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -381,7 +381,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -427,7 +427,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -473,7 +473,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -483,7 +483,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -528,7 +528,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -601,7 +601,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts index 931ab9c37121..847b5deb8b04 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/store.service.ts @@ -138,7 +138,7 @@ export class StoreService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -178,7 +178,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -218,7 +218,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -258,7 +258,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -266,7 +266,7 @@ export class StoreService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts index 59afd0e25e59..7753232bf2fd 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/api/user.service.ts @@ -204,7 +204,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -212,7 +212,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -247,7 +247,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -255,7 +255,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -290,7 +290,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -298,7 +298,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -333,7 +333,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -373,7 +373,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -425,7 +425,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -460,7 +460,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -502,7 +502,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -510,7 +510,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/npm/configuration.ts b/samples/client/petstore/typescript-angular-v2/npm/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v2/npm/configuration.ts +++ b/samples/client/petstore/typescript-angular-v2/npm/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts index 7db456a77bcc..b0ad15622684 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/pet.service.ts @@ -218,7 +218,7 @@ export class PetService implements PetServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -228,7 +228,7 @@ export class PetService implements PetServiceInterface { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -275,7 +275,7 @@ export class PetService implements PetServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -328,7 +328,7 @@ export class PetService implements PetServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -382,7 +382,7 @@ export class PetService implements PetServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -428,7 +428,7 @@ export class PetService implements PetServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -474,7 +474,7 @@ export class PetService implements PetServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -484,7 +484,7 @@ export class PetService implements PetServiceInterface { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -529,7 +529,7 @@ export class PetService implements PetServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -602,7 +602,7 @@ export class PetService implements PetServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts index c44849827d44..5b2bfbd3c55b 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/store.service.ts @@ -139,7 +139,7 @@ export class StoreService implements StoreServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -179,7 +179,7 @@ export class StoreService implements StoreServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -219,7 +219,7 @@ export class StoreService implements StoreServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -259,7 +259,7 @@ export class StoreService implements StoreServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -267,7 +267,7 @@ export class StoreService implements StoreServiceInterface { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts index bc249e0697d1..22b37f0f4c58 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/api/user.service.ts @@ -205,7 +205,7 @@ export class UserService implements UserServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -213,7 +213,7 @@ export class UserService implements UserServiceInterface { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -248,7 +248,7 @@ export class UserService implements UserServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -256,7 +256,7 @@ export class UserService implements UserServiceInterface { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -291,7 +291,7 @@ export class UserService implements UserServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -299,7 +299,7 @@ export class UserService implements UserServiceInterface { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -334,7 +334,7 @@ export class UserService implements UserServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -374,7 +374,7 @@ export class UserService implements UserServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -426,7 +426,7 @@ export class UserService implements UserServiceInterface { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -461,7 +461,7 @@ export class UserService implements UserServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -503,7 +503,7 @@ export class UserService implements UserServiceInterface { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -511,7 +511,7 @@ export class UserService implements UserServiceInterface { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts b/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts +++ b/samples/client/petstore/typescript-angular-v2/with-interfaces/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4.3/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts index c5df6d33974c..7074a6a017cd 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/pet.service.ts @@ -86,7 +86,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -96,7 +96,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -144,7 +144,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -198,7 +198,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -253,7 +253,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -300,7 +300,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -347,7 +347,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -357,7 +357,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -403,7 +403,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -473,7 +473,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts index 61b09e3bb614..3c4d5efca8dc 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/store.service.ts @@ -77,7 +77,7 @@ export class StoreService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -118,7 +118,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -159,7 +159,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -200,7 +200,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -208,7 +208,7 @@ export class StoreService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts index e48c2f45045d..2119fddcba57 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/api/user.service.ts @@ -77,7 +77,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -85,7 +85,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -121,7 +121,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -129,7 +129,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -165,7 +165,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -173,7 +173,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -209,7 +209,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -250,7 +250,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -303,7 +303,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -339,7 +339,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -382,7 +382,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -390,7 +390,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts b/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts +++ b/samples/client/petstore/typescript-angular-v4.3/npm/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v4/npm/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts index 3cfcd08d1d1a..f6c95294851a 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/pet.service.ts @@ -217,7 +217,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -227,7 +227,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -274,7 +274,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -327,7 +327,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -381,7 +381,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -427,7 +427,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -473,7 +473,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -483,7 +483,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -528,7 +528,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -601,7 +601,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts index 931ab9c37121..847b5deb8b04 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/store.service.ts @@ -138,7 +138,7 @@ export class StoreService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -178,7 +178,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -218,7 +218,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -258,7 +258,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -266,7 +266,7 @@ export class StoreService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts index 59afd0e25e59..7753232bf2fd 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/api/user.service.ts @@ -204,7 +204,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -212,7 +212,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -247,7 +247,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -255,7 +255,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -290,7 +290,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -298,7 +298,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } @@ -333,7 +333,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -373,7 +373,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -425,7 +425,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -460,7 +460,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -502,7 +502,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers.set('Accept', httpHeaderAcceptSelected); } @@ -510,7 +510,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v4/npm/configuration.ts b/samples/client/petstore/typescript-angular-v4/npm/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v4/npm/configuration.ts +++ b/samples/client/petstore/typescript-angular-v4/npm/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/pet.service.ts index 027c80604fd5..59fcf6247d96 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/pet.service.ts @@ -86,7 +86,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -96,7 +96,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -144,7 +144,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -198,7 +198,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -253,7 +253,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -300,7 +300,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -347,7 +347,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -357,7 +357,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -403,7 +403,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -473,7 +473,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/store.service.ts index dbc6e413c9ab..e1a4f639926b 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/store.service.ts @@ -77,7 +77,7 @@ export class StoreService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -118,7 +118,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -159,7 +159,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -200,7 +200,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -208,7 +208,7 @@ export class StoreService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/user.service.ts index aaab455058c8..ba8a8f6864eb 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/api/user.service.ts @@ -77,7 +77,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -85,7 +85,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -121,7 +121,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -129,7 +129,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -165,7 +165,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -173,7 +173,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -209,7 +209,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -250,7 +250,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -303,7 +303,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -339,7 +339,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -382,7 +382,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -390,7 +390,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/configuration.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/default/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/.openapi-generator/VERSION index 096bf47efe31..ad121e8340e0 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/.openapi-generator/VERSION +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +3.0.1-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/pet.service.ts index a4637b776964..661f02c0829c 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/pet.service.ts @@ -88,7 +88,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -98,7 +98,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -146,7 +146,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -200,7 +200,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -255,7 +255,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -302,7 +302,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -349,7 +349,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -359,7 +359,7 @@ export class PetService { 'application/xml' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -405,7 +405,7 @@ export class PetService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -475,7 +475,7 @@ export class PetService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/store.service.ts index 5681c5f4689f..574bd32c4cdf 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/store.service.ts @@ -79,7 +79,7 @@ export class StoreService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -120,7 +120,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -161,7 +161,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -202,7 +202,7 @@ export class StoreService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -210,7 +210,7 @@ export class StoreService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/user.service.ts index cef8d6a96af5..a3c6a1e460d4 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/api/user.service.ts @@ -79,7 +79,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -87,7 +87,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -123,7 +123,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -131,7 +131,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -167,7 +167,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -175,7 +175,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -211,7 +211,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -252,7 +252,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -305,7 +305,7 @@ export class UserService { 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -341,7 +341,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -384,7 +384,7 @@ export class UserService { let httpHeaderAccepts: string[] = [ ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -392,7 +392,7 @@ export class UserService { const consumes: string[] = [ ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/configuration.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/configuration.ts index 82e8458f39e1..5dac1323937e 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/default/configuration.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/default/configuration.ts @@ -32,7 +32,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } @@ -51,7 +51,7 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } @@ -74,6 +74,6 @@ export class Configuration { */ public isJsonMime(mime: string): boolean { const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime != null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } }