@@ -85,10 +85,7 @@ export class ApiEndpoints {
85
85
break ;
86
86
default :
87
87
if ( utils . matchContentType ( contentType , `application/json` ) ) {
88
- res . error = utils . deserializeJSONResponse (
89
- httpRes ?. data ,
90
- shared . ErrorT
91
- ) ;
88
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
92
89
}
93
90
break ;
94
91
}
@@ -147,18 +144,15 @@ export class ApiEndpoints {
147
144
switch ( true ) {
148
145
case httpRes ?. status == 200 :
149
146
if ( utils . matchContentType ( contentType , `application/json` ) ) {
150
- res . apiEndpoint = utils . deserializeJSONResponse (
147
+ res . apiEndpoint = utils . objectToClass (
151
148
httpRes ?. data ,
152
149
shared . ApiEndpoint
153
150
) ;
154
151
}
155
152
break ;
156
153
default :
157
154
if ( utils . matchContentType ( contentType , `application/json` ) ) {
158
- res . error = utils . deserializeJSONResponse (
159
- httpRes ?. data ,
160
- shared . ErrorT
161
- ) ;
155
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
162
156
}
163
157
break ;
164
158
}
@@ -217,18 +211,15 @@ export class ApiEndpoints {
217
211
switch ( true ) {
218
212
case httpRes ?. status == 200 :
219
213
if ( utils . matchContentType ( contentType , `application/json` ) ) {
220
- res . generateOpenApiSpecDiff = utils . deserializeJSONResponse (
214
+ res . generateOpenApiSpecDiff = utils . objectToClass (
221
215
httpRes ?. data ,
222
216
shared . GenerateOpenApiSpecDiff
223
217
) ;
224
218
}
225
219
break ;
226
220
default :
227
221
if ( utils . matchContentType ( contentType , `application/json` ) ) {
228
- res . error = utils . deserializeJSONResponse (
229
- httpRes ?. data ,
230
- shared . ErrorT
231
- ) ;
222
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
232
223
}
233
224
break ;
234
225
}
@@ -295,10 +286,7 @@ export class ApiEndpoints {
295
286
break ;
296
287
default :
297
288
if ( utils . matchContentType ( contentType , `application/json` ) ) {
298
- res . error = utils . deserializeJSONResponse (
299
- httpRes ?. data ,
300
- shared . ErrorT
301
- ) ;
289
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
302
290
}
303
291
break ;
304
292
}
@@ -355,7 +343,7 @@ export class ApiEndpoints {
355
343
if ( utils . matchContentType ( contentType , `application/json` ) ) {
356
344
res . apiEndpoints = [ ] ;
357
345
const resFieldDepth : number = utils . getResFieldDepth ( res ) ;
358
- res . apiEndpoints = utils . deserializeJSONResponse (
346
+ res . apiEndpoints = utils . objectToClass (
359
347
httpRes ?. data ,
360
348
shared . ApiEndpoint ,
361
349
resFieldDepth
@@ -364,10 +352,7 @@ export class ApiEndpoints {
364
352
break ;
365
353
default :
366
354
if ( utils . matchContentType ( contentType , `application/json` ) ) {
367
- res . error = utils . deserializeJSONResponse (
368
- httpRes ?. data ,
369
- shared . ErrorT
370
- ) ;
355
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
371
356
}
372
357
break ;
373
358
}
@@ -424,7 +409,7 @@ export class ApiEndpoints {
424
409
if ( utils . matchContentType ( contentType , `application/json` ) ) {
425
410
res . apiEndpoints = [ ] ;
426
411
const resFieldDepth : number = utils . getResFieldDepth ( res ) ;
427
- res . apiEndpoints = utils . deserializeJSONResponse (
412
+ res . apiEndpoints = utils . objectToClass (
428
413
httpRes ?. data ,
429
414
shared . ApiEndpoint ,
430
415
resFieldDepth
@@ -433,10 +418,7 @@ export class ApiEndpoints {
433
418
break ;
434
419
default :
435
420
if ( utils . matchContentType ( contentType , `application/json` ) ) {
436
- res . error = utils . deserializeJSONResponse (
437
- httpRes ?. data ,
438
- shared . ErrorT
439
- ) ;
421
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
440
422
}
441
423
break ;
442
424
}
@@ -491,18 +473,15 @@ export class ApiEndpoints {
491
473
switch ( true ) {
492
474
case httpRes ?. status == 200 :
493
475
if ( utils . matchContentType ( contentType , `application/json` ) ) {
494
- res . apiEndpoint = utils . deserializeJSONResponse (
476
+ res . apiEndpoint = utils . objectToClass (
495
477
httpRes ?. data ,
496
478
shared . ApiEndpoint
497
479
) ;
498
480
}
499
481
break ;
500
482
default :
501
483
if ( utils . matchContentType ( contentType , `application/json` ) ) {
502
- res . error = utils . deserializeJSONResponse (
503
- httpRes ?. data ,
504
- shared . ErrorT
505
- ) ;
484
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
506
485
}
507
486
break ;
508
487
}
@@ -577,18 +556,15 @@ export class ApiEndpoints {
577
556
switch ( true ) {
578
557
case httpRes ?. status == 200 :
579
558
if ( utils . matchContentType ( contentType , `application/json` ) ) {
580
- res . apiEndpoint = utils . deserializeJSONResponse (
559
+ res . apiEndpoint = utils . objectToClass (
581
560
httpRes ?. data ,
582
561
shared . ApiEndpoint
583
562
) ;
584
563
}
585
564
break ;
586
565
default :
587
566
if ( utils . matchContentType ( contentType , `application/json` ) ) {
588
- res . error = utils . deserializeJSONResponse (
589
- httpRes ?. data ,
590
- shared . ErrorT
591
- ) ;
567
+ res . error = utils . objectToClass ( httpRes ?. data , shared . ErrorT ) ;
592
568
}
593
569
break ;
594
570
}
0 commit comments