Skip to content

Commit 696442c

Browse files
committed
chore: regenerate samples.
1 parent f5aa790 commit 696442c

File tree

18 files changed

+198
-36
lines changed

18 files changed

+198
-36
lines changed

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// 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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// 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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

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

+11-2
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,30 @@ 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)) {
34+
if (isDeep) {
35+
return this.addToHttpParamsRecursive(httpParams, value, key, isDeep);
36+
}
3437
return this.addToHttpParamsRecursive(httpParams, value);
3538
}
3639
return this.addToHttpParamsRecursive(httpParams, value, key);
3740
}
3841

39-
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
42+
protected addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string, isDeep?: boolean): HttpParams {
4043
if (value === null || value === undefined) {
4144
return httpParams;
4245
}
4346
if (typeof value === 'object') {
4447
// If JSON format is preferred, key must be provided.
4548
if (key != null) {
49+
if (isDeep) {
50+
return Object.entries(value as Record<string, any>).reduce(
51+
(hp, [k, v]) => hp.append(`${key}[${k}]`, v),
52+
httpParams,
53+
);
54+
}
4655
return httpParams.append(key, JSON.stringify(value));
4756
}
4857
// Otherwise, if it's an array, add each element.

0 commit comments

Comments
 (0)