From c59943d2f68dadde6d9a3fde663e233a22aeda46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Fr=C4=85k?= Date: Mon, 3 Feb 2020 09:52:23 +0100 Subject: [PATCH] #5174 fix [BUG] [typescript-angular]: objects as query parameters break when fields are null --- .../resources/typescript-angular/api.service.mustache | 6 +++++- .../typescript-angular-v2/default/api/pet.service.ts | 6 +++++- .../typescript-angular-v2/default/api/store.service.ts | 6 +++++- .../typescript-angular-v2/default/api/user.service.ts | 6 +++++- .../typescript-angular-v2/npm/api/pet.service.ts | 6 +++++- .../typescript-angular-v2/npm/api/store.service.ts | 6 +++++- .../typescript-angular-v2/npm/api/user.service.ts | 6 +++++- .../with-interfaces/api/pet.service.ts | 6 +++++- .../with-interfaces/api/store.service.ts | 6 +++++- .../with-interfaces/api/user.service.ts | 6 +++++- .../typescript-angular-v4.3/npm/api/pet.service.ts | 6 +++++- .../typescript-angular-v4.3/npm/api/store.service.ts | 6 +++++- .../typescript-angular-v4.3/npm/api/user.service.ts | 6 +++++- .../typescript-angular-v4/npm/api/pet.service.ts | 6 +++++- .../typescript-angular-v4/npm/api/store.service.ts | 6 +++++- .../typescript-angular-v4/npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 6 +++++- .../builds/default/api/store.service.ts | 6 +++++- .../builds/default/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 10 +++++++--- .../builds/default/api/store.service.ts | 8 ++++++-- .../builds/default/api/user.service.ts | 8 ++++++-- .../builds/with-npm/api/pet.service.ts | 10 +++++++--- .../builds/with-npm/api/store.service.ts | 8 ++++++-- .../builds/with-npm/api/user.service.ts | 8 ++++++-- .../builds/default/api/pet.service.ts | 6 +++++- .../builds/default/api/store.service.ts | 6 +++++- .../builds/default/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../builds/default/api/pet.service.ts | 10 +++++++--- .../builds/default/api/store.service.ts | 8 ++++++-- .../builds/default/api/user.service.ts | 8 ++++++-- .../builds/with-npm/api/pet.service.ts | 10 +++++++--- .../builds/with-npm/api/store.service.ts | 8 ++++++-- .../builds/with-npm/api/user.service.ts | 8 ++++++-- .../builds/single-request-parameter/api/pet.service.ts | 6 +++++- .../single-request-parameter/api/store.service.ts | 6 +++++- .../single-request-parameter/api/user.service.ts | 6 +++++- .../builds/with-npm/api/pet.service.ts | 6 +++++- .../builds/with-npm/api/store.service.ts | 6 +++++- .../builds/with-npm/api/user.service.ts | 6 +++++- .../with-prefixed-module-name/api/pet.service.ts | 6 +++++- .../with-prefixed-module-name/api/store.service.ts | 6 +++++- .../with-prefixed-module-name/api/user.service.ts | 6 +++++- 49 files changed, 261 insertions(+), 65 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 87cadfeffd01..76b89574c8a3 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 @@ -160,7 +160,11 @@ export class {{classname}} { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 b3e2c36aff6c..8f67e96d0515 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 @@ -213,7 +213,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 8a1423204db1..9f2a18f2058f 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 @@ -125,7 +125,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 f26457950958..775aa5444958 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 @@ -195,7 +195,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 b3e2c36aff6c..8f67e96d0515 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 @@ -213,7 +213,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 8a1423204db1..9f2a18f2058f 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 @@ -125,7 +125,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 f26457950958..775aa5444958 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 @@ -195,7 +195,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 465d6937c640..044ac52ec806 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 @@ -216,7 +216,11 @@ export class PetService implements PetServiceInterface { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 915597477ef3..10ab6a503dac 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 @@ -128,7 +128,11 @@ export class StoreService implements StoreServiceInterface { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 21ca1cc63355..5fdbf8f1f2a9 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 @@ -198,7 +198,11 @@ export class UserService implements UserServiceInterface { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 8426b43a3afe..92d948b9d961 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 @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 633f00b1d6e0..58e41b985abc 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 @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 9eea4e0e3dc3..f5fe8ff9b065 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 @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 b3e2c36aff6c..8f67e96d0515 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 @@ -213,7 +213,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 8a1423204db1..9f2a18f2058f 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 @@ -125,7 +125,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); 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 f26457950958..775aa5444958 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 @@ -195,7 +195,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts index dc1719750f1e..9eec3b019110 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts index af2d5a127a9b..19026d5119b6 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts index c4ea31b47872..154581165319 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts index dc1719750f1e..9eec3b019110 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts index af2d5a127a9b..19026d5119b6 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts index c4ea31b47872..154581165319 100644 --- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts index fc90178d82f5..4ce70b522475 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/pet.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); @@ -161,7 +165,7 @@ export class PetService { /** * Deletes a pet * @param petId Pet id to delete - * @param apiKey + * @param apiKey * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts index 2ce18a1079ba..3d66c88fe284 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/store.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts index 6e5337b51d1e..5d00bcaef952 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/api/user.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts index fc90178d82f5..4ce70b522475 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/pet.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); @@ -161,7 +165,7 @@ export class PetService { /** * Deletes a pet * @param petId Pet id to delete - * @param apiKey + * @param apiKey * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts index 2ce18a1079ba..3d66c88fe284 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/store.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts index 6e5337b51d1e..5d00bcaef952 100644 --- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/api/user.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts index dc1719750f1e..9eec3b019110 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts index af2d5a127a9b..19026d5119b6 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts index c4ea31b47872..154581165319 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts index dc1719750f1e..9eec3b019110 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/pet.service.ts @@ -70,7 +70,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts index af2d5a127a9b..19026d5119b6 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/store.service.ts @@ -56,7 +56,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts index c4ea31b47872..154581165319 100644 --- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/api/user.service.ts @@ -56,7 +56,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts index fc90178d82f5..4ce70b522475 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/pet.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); @@ -161,7 +165,7 @@ export class PetService { /** * Deletes a pet * @param petId Pet id to delete - * @param apiKey + * @param apiKey * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts index 2ce18a1079ba..3d66c88fe284 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/store.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts index 6e5337b51d1e..5d00bcaef952 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/api/user.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts index fc90178d82f5..4ce70b522475 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/pet.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); @@ -161,7 +165,7 @@ export class PetService { /** * Deletes a pet * @param petId Pet id to delete - * @param apiKey + * @param apiKey * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts index 2ce18a1079ba..3d66c88fe284 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/store.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts index 6e5337b51d1e..5d00bcaef952 100644 --- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/api/user.service.ts @@ -3,7 +3,7 @@ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters. * * The version of the OpenAPI document: 1.0.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts index f429414093f1..fc0f91de3149 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/pet.service.ts @@ -109,7 +109,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts index 1e66b9a6bb8e..446792e2cf96 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/store.service.ts @@ -70,7 +70,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts index b5ba06f79c33..1fc9968f3332 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/api/user.service.ts @@ -88,7 +88,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts index fc90178d82f5..7a4ea14866e5 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts index 2ce18a1079ba..874db32b0a2c 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts index 6e5337b51d1e..63be020c0904 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts index fc90178d82f5..7a4ea14866e5 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/pet.service.ts @@ -72,7 +72,11 @@ export class PetService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts index 2ce18a1079ba..874db32b0a2c 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/store.service.ts @@ -58,7 +58,11 @@ export class StoreService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts index 6e5337b51d1e..63be020c0904 100644 --- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts +++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/api/user.service.ts @@ -58,7 +58,11 @@ export class UserService { return httpParams; } - private addToHttpParamsRecursive(httpParams: HttpParams, value: any, key?: string): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if(value == null) { + return httpParams; + } + if (typeof value === "object") { if (Array.isArray(value)) { (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));