Skip to content

Commit 73a1b68

Browse files
committed
chore: refresh code gen tests
1 parent cc6a0c8 commit 73a1b68

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+3528
-3541
lines changed

index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ program
4848
)
4949
.option("--extract-request-body", "extract request body type to data contract", false)
5050
.option("--extract-response-body", "extract response body type to data contract", false)
51+
.option("--extract-response-error", "extract response error type to data contract", false)
5152
.option("--modular", "generate separated files for http client, data contracts, and routes", false)
5253
.option("--js", "generate js api module with declaration file", false)
5354
.option(
@@ -88,6 +89,7 @@ generateApi({
8889
extractRequestParams: !!program.extractRequestParams,
8990
extractRequestBody: !!program.extractRequestBody,
9091
extractResponseBody: !!program.extractResponseBody,
92+
extractResponseError: !!program.extractResponseError,
9193
input: resolve(process.cwd(), program.path),
9294
output: resolve(process.cwd(), program.output || "."),
9395
templates: program.templates,

tests/generated/v2.0/adafruit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ export class HttpClient<SecurityDataType = unknown> {
339339
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
340340
...(requestParams.headers || {}),
341341
},
342-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
342+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
343343
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
344344
}).then(async (response) => {
345345
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/another-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ export class HttpClient<SecurityDataType = unknown> {
315315
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
316316
...(requestParams.headers || {}),
317317
},
318-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
318+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
319319
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
320320
}).then(async (response) => {
321321
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/another-schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class HttpClient<SecurityDataType = unknown> {
207207
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
208208
...(requestParams.headers || {}),
209209
},
210-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
210+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
211211
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
212212
}).then(async (response) => {
213213
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/api-with-examples.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class HttpClient<SecurityDataType = unknown> {
184184
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
185185
...(requestParams.headers || {}),
186186
},
187-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
187+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
188188
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
189189
}).then(async (response) => {
190190
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/authentiq.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export class HttpClient<SecurityDataType = unknown> {
236236
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
237237
...(requestParams.headers || {}),
238238
},
239-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
239+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
240240
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
241241
}).then(async (response) => {
242242
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/enums.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ export class HttpClient<SecurityDataType = unknown> {
249249
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
250250
...(requestParams.headers || {}),
251251
},
252-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
252+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
253253
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
254254
}).then(async (response) => {
255255
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/example1.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export class HttpClient<SecurityDataType = unknown> {
211211
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
212212
...(requestParams.headers || {}),
213213
},
214-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
214+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
215215
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
216216
}).then(async (response) => {
217217
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/file-formdata-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export class HttpClient<SecurityDataType = unknown> {
184184
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
185185
...(requestParams.headers || {}),
186186
},
187-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
187+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
188188
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
189189
}).then(async (response) => {
190190
const r = response as HttpResponse<T, E>;

tests/generated/v2.0/furkot-example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ export class HttpClient<SecurityDataType = unknown> {
247247
...(type && type !== ContentType.FormData ? { "Content-Type": type } : {}),
248248
...(requestParams.headers || {}),
249249
},
250-
signal: cancelToken ? this.createAbortSignal(cancelToken) : void 0,
250+
signal: cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal,
251251
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body),
252252
}).then(async (response) => {
253253
const r = response as HttpResponse<T, E>;

0 commit comments

Comments
 (0)