Skip to content

Commit 4443ac3

Browse files
committed
fix(service): object instead of any in case of nested properties in method parameter
1 parent e8b7667 commit 4443ac3

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/parser.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,8 @@ function transformParameters(
619619
? param.enum || []
620620
: (param.enum || []).map(str => `'${str}'`)
621621
).join(' | ')
622+
: 'schema' in param && param.schema && param.schema.properties
623+
? 'object'
622624
: toTypescriptType(
623625
isArray
624626
? determineArrayType(param as Schema)

tests/esquare/api/api-client.interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ export interface APIClientInterface {
416416
*/
417417
createRole(
418418
args: {
419-
body: any, // Role entity object that needs to be added
419+
body: object, // Role entity object that needs to be added
420420
},
421421
requestHttpOptions?: HttpOptions
422422
): Observable<models.RoleDetailsItem>;

tests/esquare/api/api-client.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ export class APIClient implements APIClientInterface {
838838
*/
839839
createRole(
840840
args: {
841-
body: any, // Role entity object that needs to be added
841+
body: object, // Role entity object that needs to be added
842842
},
843843
requestHttpOptions?: HttpOptions
844844
): Observable<models.RoleDetailsItem> {

tests/esquare/api/guarded-api-client.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export class GuardedAPIClient extends APIClient {
349349

350350
createRole(
351351
args: {
352-
body: any, // Role entity object that needs to be added
352+
body: object, // Role entity object that needs to be added
353353
},
354354
requestHttpOptions?: HttpOptions
355355
): Observable<models.RoleDetailsItem> {

0 commit comments

Comments
 (0)