Skip to content

Commit b5472b6

Browse files
committed
chore: regenerate samples
1 parent 810f2ad commit b5472b6

18 files changed

Lines changed: 126 additions & 198 deletions

File tree

samples/client/others/typescript-angular/builds/composed-schemas-tagged-unions/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/others/typescript-angular/builds/composed-schemas/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v12-oneOf/builds/default/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v12-provided-in-any/builds/default/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v12-provided-in-root/builds/default/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v12-provided-in-root/builds/with-npm/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v13-oneOf/builds/default/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v13-provided-in-any/builds/default/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v13-provided-in-root/builds/default/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

samples/client/petstore/typescript-angular-v13-provided-in-root/builds/with-npm/api.base.service.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,31 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep: boolean = false): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
34-
if (isDeep) {
35-
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36-
}
37-
return this.addToHttpParamsRecursive(httpParams, value);
34+
return this.addToHttpParamsRecursive(httpParams, value, isDeep ? key : undefined, isDeep);
3835
}
3936
return this.addToHttpParamsRecursive(httpParams, value, key);
4037
}
4138

42-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep: boolean = false): HttpParams {
4340
if (value === null || value === undefined) {
4441
return httpParams;
4542
}
4643
if (typeof value === 'object') {
4744
// If JSON format is preferred, key must be provided.
4845
if (key != null) {
49-
if (isDeep) {
50-
return Object.entries(value as Record<string, any>).reduce(
46+
return isDeep
47+
? Object.entries(value as Record<string, any>).reduce(
5148
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
5249
httpParams,
53-
);
54-
}
55-
return httpParams.append(key, JSON.stringify(value));
50+
)
51+
: httpParams.append(key, JSON.stringify(value));
5652
}
5753
// Otherwise, if it's an array, add each element.
5854
if (Array.isArray(value)) {

0 commit comments

Comments
 (0)