Skip to content

Commit e949803

Browse files
committed
chore: regenerate samples.
1 parent 4e321df commit e949803

File tree

18 files changed

+162
-54
lines changed

18 files changed

+162
-54
lines changed

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

samples/client/petstore/typescript-angular-v14-query-param-object-format/api.base.service.ts

+9-3
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,27 @@ export class BaseService {
2828
return consumes.indexOf('multipart/form-data') !== -1;
2929
}
3030

31-
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
31+
protected addToHttpParams(httpParams: HttpParams, value: any, key?: string, isDeep?: boolean): HttpParams {
3232
// If the value is an object (but not a Date), recursively add its keys.
3333
if (typeof value === 'object' && !(value instanceof Date)) {
3434
return this.addToHttpParamsRecursive(httpParams, value);
3535
}
36-
return this.addToHttpParamsRecursive(httpParams, value, key);
36+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
3737
}
3838

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
39+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4040
if (value === null || value === undefined) {
4141
return httpParams;
4242
}
4343
if (typeof value === 'object') {
4444
// If JSON format is preferred, key must be provided.
4545
if (key != null) {
46+
if (isDeep) {
47+
return Object.entries(value as Record<string, any>).reduce(
48+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
49+
httpParams,
50+
);
51+
}
4652
return httpParams.append(key, JSON.stringify(value));
4753
}
4854
// Otherwise, if it's an array, add each element.

0 commit comments

Comments
 (0)