From 6862506fac19980e2e84f7ec2a1432efbde9f95f Mon Sep 17 00:00:00 2001 From: Michael M Date: Fri, 27 Oct 2023 20:24:35 +0200 Subject: [PATCH] chore: fix tests --- .../original-results/all-operations/models.ts | 2 + .../all-operations/services/no-tag.service.ts | 98 +++++++------------ .../all-operations/services/tag-1.service.ts | 26 ++--- .../all-operations/services/tag-2.service.ts | 18 ++-- .../tag-tag-2-tag-3-tag-4-tag-5.service.ts | 10 +- .../original-results/all-types/models.ts | 2 + .../all-types/services/api.service.ts | 26 ++--- .../default-success-response/models.ts | 2 + .../services/api.service.ts | 18 ++-- .../original-results/person-place/models.ts | 2 + .../original-results/petstore/models.ts | 2 + .../petstore/services/pets.service.ts | 26 ++--- .../original-results/polymorphic/models.ts | 2 + .../original-results/self-ref/models.ts | 2 + .../original-results/skipJsonSuffix/models.ts | 2 + .../skipJsonSuffix/services/api.service.ts | 26 ++--- 16 files changed, 111 insertions(+), 153 deletions(-) diff --git a/tools/executors/pseudo-test/original-results/all-operations/models.ts b/tools/executors/pseudo-test/original-results/all-operations/models.ts index 1035aae..bdfca33 100644 --- a/tools/executors/pseudo-test/original-results/all-operations/models.ts +++ b/tools/executors/pseudo-test/original-results/all-operations/models.ts @@ -1,3 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ export { RefString } from './models/ref-string'; export { RefObject } from './models/ref-object'; export { Error } from './models/error'; diff --git a/tools/executors/pseudo-test/original-results/all-operations/services/no-tag.service.ts b/tools/executors/pseudo-test/original-results/all-operations/services/no-tag.service.ts index d56e3d3..9a5ddac 100644 --- a/tools/executors/pseudo-test/original-results/all-operations/services/no-tag.service.ts +++ b/tools/executors/pseudo-test/original-results/all-operations/services/no-tag.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -45,11 +45,9 @@ export class NoTagService { rb.path('id', params.id, {}); } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/*+json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/*+json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse>, @@ -93,11 +91,9 @@ export class NoTagService { rb.body(params.body, 'application/json'); } - return this.http.request(rb.build({ - responseType: 'text', - accept: 'text/plain', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: 'text/plain', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -136,11 +132,9 @@ export class NoTagService { rb.body(params.body, 'application/json'); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'text/binary', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'text/binary', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -179,11 +173,9 @@ export class NoTagService { rb.body(params.body, 'application/json'); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'image/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'image/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -222,11 +214,9 @@ export class NoTagService { rb.body(params.body, 'text/plain'); } - return this.http.request(rb.build({ - responseType: 'text', - accept: 'text/plain', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: 'text/plain', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -265,11 +255,9 @@ export class NoTagService { rb.body(params.body, 'text/plain'); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'text/binary', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'text/binary', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -308,11 +296,9 @@ export class NoTagService { rb.body(params.body, 'text/plain'); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'image/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'image/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -351,11 +337,9 @@ export class NoTagService { rb.body(params.body, '*/*'); } - return this.http.request(rb.build({ - responseType: 'text', - accept: 'text/plain', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: 'text/plain', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -394,11 +378,9 @@ export class NoTagService { rb.body(params.body, '*/*'); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'text/binary', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'text/binary', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -437,11 +419,9 @@ export class NoTagService { rb.body(params.body, '*/*'); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'image/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'image/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -481,11 +461,9 @@ export class NoTagService { if (params) { } - return this.http.request(rb.build({ - responseType: 'text', - accept: 'text/plain', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: 'text/plain', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -526,11 +504,9 @@ export class NoTagService { if (params) { } - return this.http.request(rb.build({ - responseType: 'blob', - accept: '*/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: '*/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, diff --git a/tools/executors/pseudo-test/original-results/all-operations/services/tag-1.service.ts b/tools/executors/pseudo-test/original-results/all-operations/services/tag-1.service.ts index 258e2b3..f6afe6e 100644 --- a/tools/executors/pseudo-test/original-results/all-operations/services/tag-1.service.ts +++ b/tools/executors/pseudo-test/original-results/all-operations/services/tag-1.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -102,11 +102,9 @@ export class Tag1Service { rb.query('a-b', params['a-b'], {}); } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'text/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'text/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -245,11 +243,9 @@ export class Tag1Service { rb.query('a-b', params['a-b'], {}); } - return this.http.request(rb.build({ - responseType: 'blob', - accept: 'image/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'blob', accept: 'image/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -351,11 +347,9 @@ export class Tag1Service { rb.header('param2', params.param2, {}); } - return this.http.request(rb.build({ - responseType: 'text', - accept: '*/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: '*/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse, diff --git a/tools/executors/pseudo-test/original-results/all-operations/services/tag-2.service.ts b/tools/executors/pseudo-test/original-results/all-operations/services/tag-2.service.ts index 5fc86e5..1d15d3e 100644 --- a/tools/executors/pseudo-test/original-results/all-operations/services/tag-2.service.ts +++ b/tools/executors/pseudo-test/original-results/all-operations/services/tag-2.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -64,11 +64,9 @@ export class Tag2Service { rb.body(params.body, 'application/json'); } - return this.http.request(rb.build({ - responseType: 'text', - accept: '*/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: '*/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse, @@ -144,11 +142,9 @@ export class Tag2Service { rb.body(params.body, 'text/plain'); } - return this.http.request(rb.build({ - responseType: 'text', - accept: '*/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: '*/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse, diff --git a/tools/executors/pseudo-test/original-results/all-operations/services/tag/tag2/tag3/tag4/tag-tag-2-tag-3-tag-4-tag-5.service.ts b/tools/executors/pseudo-test/original-results/all-operations/services/tag/tag2/tag3/tag4/tag-tag-2-tag-3-tag-4-tag-5.service.ts index 5f374a6..6915291 100644 --- a/tools/executors/pseudo-test/original-results/all-operations/services/tag/tag2/tag3/tag4/tag-tag-2-tag-3-tag-4-tag-5.service.ts +++ b/tools/executors/pseudo-test/original-results/all-operations/services/tag/tag2/tag3/tag4/tag-tag-2-tag-3-tag-4-tag-5.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -43,11 +43,9 @@ export class TagTag2Tag3Tag4Tag5Service { if (params) { } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse<{ diff --git a/tools/executors/pseudo-test/original-results/all-types/models.ts b/tools/executors/pseudo-test/original-results/all-types/models.ts index 4ca832f..e243925 100644 --- a/tools/executors/pseudo-test/original-results/all-types/models.ts +++ b/tools/executors/pseudo-test/original-results/all-types/models.ts @@ -1,3 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ export { RefEnum } from './models/ref-enum'; export { RefIntEnum } from './models/ref-int-enum'; export { RefNamedIntEnum } from './models/ref-named-int-enum'; diff --git a/tools/executors/pseudo-test/original-results/all-types/services/api.service.ts b/tools/executors/pseudo-test/original-results/all-types/services/api.service.ts index f8afbbb..1d2fb6e 100644 --- a/tools/executors/pseudo-test/original-results/all-types/services/api.service.ts +++ b/tools/executors/pseudo-test/original-results/all-types/services/api.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -51,11 +51,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -96,11 +94,9 @@ export class ApiService { rb.query('param', params.param, {}); } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse<(ReferencedInServiceOneOf1 | ReferencedInServiceOneOf2)>, @@ -140,11 +136,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, diff --git a/tools/executors/pseudo-test/original-results/default-success-response/models.ts b/tools/executors/pseudo-test/original-results/default-success-response/models.ts index e69de29..5abcaf3 100644 --- a/tools/executors/pseudo-test/original-results/default-success-response/models.ts +++ b/tools/executors/pseudo-test/original-results/default-success-response/models.ts @@ -0,0 +1,2 @@ +/* tslint:disable */ +/* eslint-disable */ diff --git a/tools/executors/pseudo-test/original-results/default-success-response/services/api.service.ts b/tools/executors/pseudo-test/original-results/default-success-response/services/api.service.ts index fc06bb9..c2d42ab 100644 --- a/tools/executors/pseudo-test/original-results/default-success-response/services/api.service.ts +++ b/tools/executors/pseudo-test/original-results/default-success-response/services/api.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -42,11 +42,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -89,11 +87,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => (r as HttpResponse).clone({ body: parseFloat(String((r as HttpResponse).body)) }) as StrictHttpResponse, diff --git a/tools/executors/pseudo-test/original-results/person-place/models.ts b/tools/executors/pseudo-test/original-results/person-place/models.ts index 81752cc..3866a42 100644 --- a/tools/executors/pseudo-test/original-results/person-place/models.ts +++ b/tools/executors/pseudo-test/original-results/person-place/models.ts @@ -1,3 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ export { PPIdModel } from './models/pp-id-model'; export { PPEntityModel } from './models/pp-entity-model'; export { PPPersonModel } from './models/pp-person-model'; diff --git a/tools/executors/pseudo-test/original-results/petstore/models.ts b/tools/executors/pseudo-test/original-results/petstore/models.ts index 2ad8303..b99365c 100644 --- a/tools/executors/pseudo-test/original-results/petstore/models.ts +++ b/tools/executors/pseudo-test/original-results/petstore/models.ts @@ -1,3 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ export { PetstorePetModel } from './models/petstore-pet-model'; export { PetstorePetsModel } from './models/petstore-pets-model'; export { PetstoreErrorModel } from './models/petstore-error-model'; diff --git a/tools/executors/pseudo-test/original-results/petstore/services/pets.service.ts b/tools/executors/pseudo-test/original-results/petstore/services/pets.service.ts index d5c0fa0..9d94ed6 100644 --- a/tools/executors/pseudo-test/original-results/petstore/services/pets.service.ts +++ b/tools/executors/pseudo-test/original-results/petstore/services/pets.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -49,11 +49,9 @@ export class PetsService { rb.query('limit', params.limit, {}); } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -101,11 +99,9 @@ export class PetsService { if (params) { } - return this.http.request(rb.build({ - responseType: 'text', - accept: '*/*', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: '*/*', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse, @@ -154,11 +150,9 @@ export class PetsService { rb.path('petId', params.petId, {}); } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, diff --git a/tools/executors/pseudo-test/original-results/polymorphic/models.ts b/tools/executors/pseudo-test/original-results/polymorphic/models.ts index 7b614a1..08da22e 100644 --- a/tools/executors/pseudo-test/original-results/polymorphic/models.ts +++ b/tools/executors/pseudo-test/original-results/polymorphic/models.ts @@ -1,3 +1,5 @@ +/* tslint:disable */ +/* eslint-disable */ export { Tazk } from './models/Foo/Bar/tazk'; export { TazkBase } from './models/Foo/Bar/tazk-base'; export { Dooz } from './models/Foo/Bar/dooz'; diff --git a/tools/executors/pseudo-test/original-results/self-ref/models.ts b/tools/executors/pseudo-test/original-results/self-ref/models.ts index fcb7b3f..04ab6cc 100644 --- a/tools/executors/pseudo-test/original-results/self-ref/models.ts +++ b/tools/executors/pseudo-test/original-results/self-ref/models.ts @@ -1 +1,3 @@ +/* tslint:disable */ +/* eslint-disable */ export { Baz } from './models/Foo/Bar/baz'; diff --git a/tools/executors/pseudo-test/original-results/skipJsonSuffix/models.ts b/tools/executors/pseudo-test/original-results/skipJsonSuffix/models.ts index e69de29..5abcaf3 100644 --- a/tools/executors/pseudo-test/original-results/skipJsonSuffix/models.ts +++ b/tools/executors/pseudo-test/original-results/skipJsonSuffix/models.ts @@ -0,0 +1,2 @@ +/* tslint:disable */ +/* eslint-disable */ diff --git a/tools/executors/pseudo-test/original-results/skipJsonSuffix/services/api.service.ts b/tools/executors/pseudo-test/original-results/skipJsonSuffix/services/api.service.ts index 6f3e6a4..645bda1 100644 --- a/tools/executors/pseudo-test/original-results/skipJsonSuffix/services/api.service.ts +++ b/tools/executors/pseudo-test/original-results/skipJsonSuffix/services/api.service.ts @@ -7,7 +7,7 @@ * To update this file run the generation tool. */ -import { HttpClient, HttpResponse, HttpContext } from '@angular/common/http'; +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; import { Inject, Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; @@ -40,11 +40,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'json', - accept: 'application/json', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'json', accept: 'application/json', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -80,11 +78,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'text', - accept: 'text/plain', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: 'text/plain', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse, @@ -123,11 +119,9 @@ export class ApiService { if (params) { } - return this.http.request(rb.build({ - responseType: 'text', - accept: 'text/plain', - context: context, - })).pipe( + return this.http.request( + rb.build({ responseType: 'text', accept: 'text/plain', context: context }) + ).pipe( filter((r: any) => r instanceof HttpResponse), map((r: HttpResponse) => r as StrictHttpResponse,