@scalar/oas-utils 0.4.9 → 0.4.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/entities/spec/operation.d.ts +16 -16
- package/dist/entities/spec/parameters.d.ts +2 -2
- package/dist/entities/spec/request-examples.d.ts +77 -77
- package/dist/entities/spec/request-examples.d.ts.map +1 -1
- package/dist/entities/spec/request-examples.js +1 -6
- package/dist/entities/spec/request-examples.js.map +2 -2
- package/dist/entities/spec/requests.d.ts +28 -28
- package/dist/entities/spec/server.js.map +1 -1
- package/dist/helpers/fetch-document.js.map +1 -1
- package/dist/helpers/redirect-to-proxy.d.ts +1 -1
- package/dist/helpers/redirect-to-proxy.js.map +1 -1
- package/dist/spec-getters/get-example-from-schema.js.map +1 -1
- package/dist/spec-getters/get-parameters-from-operation.d.ts +9 -4
- package/dist/spec-getters/get-parameters-from-operation.d.ts.map +1 -1
- package/dist/spec-getters/get-parameters-from-operation.js.map +2 -2
- package/dist/spec-getters/get-request-body-from-operation.d.ts +3 -2
- package/dist/spec-getters/get-request-body-from-operation.d.ts.map +1 -1
- package/dist/spec-getters/get-request-body-from-operation.js +9 -5
- package/dist/spec-getters/get-request-body-from-operation.js.map +2 -2
- package/dist/transforms/import-spec.d.ts +1 -1
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +22 -3
- package/dist/transforms/import-spec.js.map +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @scalar/oas-utils
|
|
2
2
|
|
|
3
|
+
## 0.4.11
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 58287f8: refactor: create request examples without transformed operation
|
|
8
|
+
- 74fdc0e: feat: use documentUrl as fallback server
|
|
9
|
+
- Updated dependencies [d56f354]
|
|
10
|
+
- Updated dependencies [b6ac5b9]
|
|
11
|
+
- Updated dependencies [dbc09b9]
|
|
12
|
+
- Updated dependencies [ad2e3e6]
|
|
13
|
+
- Updated dependencies [20939a8]
|
|
14
|
+
- Updated dependencies [909cf33]
|
|
15
|
+
- Updated dependencies [3fdc2f2]
|
|
16
|
+
- Updated dependencies [f8ef4ab]
|
|
17
|
+
- @scalar/workspace-store@0.8.0
|
|
18
|
+
- @scalar/types@0.2.7
|
|
19
|
+
- @scalar/themes@0.13.8
|
|
20
|
+
|
|
21
|
+
## 0.4.10
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 2d7f995: refactor: use more common straight apostrophe ' instead of the real apostrophe ’
|
|
26
|
+
- Updated dependencies [2d7f995]
|
|
27
|
+
- @scalar/openapi-types@0.3.5
|
|
28
|
+
- @scalar/object-utils@1.2.2
|
|
29
|
+
- @scalar/helpers@0.0.6
|
|
30
|
+
- @scalar/themes@0.13.7
|
|
31
|
+
- @scalar/types@0.2.6
|
|
32
|
+
- @scalar/workspace-store@0.7.1
|
|
33
|
+
|
|
3
34
|
## 0.4.9
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -48,10 +48,10 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
48
48
|
summary?: string | undefined;
|
|
49
49
|
externalValue?: string | undefined;
|
|
50
50
|
}> | undefined;
|
|
51
|
+
schema?: unknown;
|
|
51
52
|
content?: unknown;
|
|
52
53
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
53
54
|
explode?: boolean | undefined;
|
|
54
|
-
schema?: unknown;
|
|
55
55
|
}, {
|
|
56
56
|
name: string;
|
|
57
57
|
in: "cookie" | "path" | "query" | "header";
|
|
@@ -64,10 +64,10 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
64
64
|
summary?: string | undefined;
|
|
65
65
|
externalValue?: string | undefined;
|
|
66
66
|
}> | undefined;
|
|
67
|
+
schema?: unknown;
|
|
67
68
|
content?: unknown;
|
|
68
69
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
69
70
|
explode?: boolean | undefined;
|
|
70
|
-
schema?: unknown;
|
|
71
71
|
}>, "many">>;
|
|
72
72
|
externalDocs: import("zod").ZodOptional<import("zod").ZodEffects<import("zod").ZodObject<{
|
|
73
73
|
description: import("zod").ZodCatch<import("zod").ZodOptional<import("zod").ZodString>>;
|
|
@@ -105,14 +105,14 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
105
105
|
}>>>;
|
|
106
106
|
}, "strip", import("zod").ZodTypeAny, {
|
|
107
107
|
content: string | Record<string, any>;
|
|
108
|
-
encoding: "binary" | "application/json" | "
|
|
108
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
109
109
|
file?: {
|
|
110
110
|
url: string;
|
|
111
111
|
base64?: string | undefined;
|
|
112
112
|
} | null | undefined;
|
|
113
113
|
}, {
|
|
114
114
|
content: string | Record<string, any>;
|
|
115
|
-
encoding: "binary" | "application/json" | "
|
|
115
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
116
116
|
file?: {
|
|
117
117
|
url: string;
|
|
118
118
|
base64?: string | undefined;
|
|
@@ -144,7 +144,7 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
144
144
|
name?: string | undefined;
|
|
145
145
|
body?: {
|
|
146
146
|
content: string | Record<string, any>;
|
|
147
|
-
encoding: "binary" | "application/json" | "
|
|
147
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
148
148
|
file?: {
|
|
149
149
|
url: string;
|
|
150
150
|
base64?: string | undefined;
|
|
@@ -160,7 +160,7 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
160
160
|
name?: string | undefined;
|
|
161
161
|
body?: {
|
|
162
162
|
content: string | Record<string, any>;
|
|
163
|
-
encoding: "binary" | "application/json" | "
|
|
163
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
164
164
|
file?: {
|
|
165
165
|
url: string;
|
|
166
166
|
base64?: string | undefined;
|
|
@@ -230,7 +230,7 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
230
230
|
selectedServerUid: (string & import("zod").BRAND<"server">) | null;
|
|
231
231
|
servers: (string & import("zod").BRAND<"server">)[];
|
|
232
232
|
examples: (string & import("zod").BRAND<"example">)[];
|
|
233
|
-
method: "options" | "
|
|
233
|
+
method: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace";
|
|
234
234
|
description?: string | undefined;
|
|
235
235
|
summary?: string | undefined;
|
|
236
236
|
externalDocs?: {
|
|
@@ -243,6 +243,7 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
243
243
|
tags?: string[] | undefined;
|
|
244
244
|
deprecated?: boolean | undefined;
|
|
245
245
|
operationId?: string | undefined;
|
|
246
|
+
requestBody?: any;
|
|
246
247
|
parameters?: {
|
|
247
248
|
name: string;
|
|
248
249
|
required: boolean;
|
|
@@ -255,16 +256,13 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
255
256
|
summary?: string | undefined;
|
|
256
257
|
externalValue?: string | undefined;
|
|
257
258
|
}> | undefined;
|
|
259
|
+
schema?: unknown;
|
|
258
260
|
content?: unknown;
|
|
259
261
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
260
262
|
explode?: boolean | undefined;
|
|
261
|
-
schema?: unknown;
|
|
262
263
|
}[] | undefined;
|
|
263
|
-
requestBody?: any;
|
|
264
264
|
responses?: Record<string, any> | undefined;
|
|
265
265
|
callbacks?: Record<string, Record<string, Record<string, any>>> | undefined;
|
|
266
|
-
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
267
|
-
'x-post-response'?: string | undefined;
|
|
268
266
|
'x-codeSamples'?: {
|
|
269
267
|
source: string;
|
|
270
268
|
label?: string | undefined;
|
|
@@ -280,6 +278,8 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
280
278
|
label?: string | undefined;
|
|
281
279
|
lang?: string | undefined;
|
|
282
280
|
}[] | undefined;
|
|
281
|
+
'x-scalar-stability'?: import("@scalar/types").XScalarStability | undefined;
|
|
282
|
+
'x-post-response'?: string | undefined;
|
|
283
283
|
}, {
|
|
284
284
|
uid?: string | undefined;
|
|
285
285
|
path?: string | undefined;
|
|
@@ -300,6 +300,7 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
300
300
|
deprecated?: boolean | undefined;
|
|
301
301
|
examples?: string[] | undefined;
|
|
302
302
|
operationId?: string | undefined;
|
|
303
|
+
requestBody?: any;
|
|
303
304
|
parameters?: {
|
|
304
305
|
name: string;
|
|
305
306
|
in: "cookie" | "path" | "query" | "header";
|
|
@@ -312,19 +313,18 @@ export declare const operationSchema: import("zod").ZodObject<import("zod").obje
|
|
|
312
313
|
summary?: string | undefined;
|
|
313
314
|
externalValue?: string | undefined;
|
|
314
315
|
}> | undefined;
|
|
316
|
+
schema?: unknown;
|
|
315
317
|
content?: unknown;
|
|
316
318
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
317
319
|
explode?: boolean | undefined;
|
|
318
|
-
schema?: unknown;
|
|
319
320
|
}[] | undefined;
|
|
320
|
-
requestBody?: any;
|
|
321
321
|
responses?: Record<string, any> | undefined;
|
|
322
322
|
callbacks?: Record<string, Record<string, Record<string, any>>> | undefined;
|
|
323
|
-
'x-scalar-stability'?: unknown;
|
|
324
|
-
method?: "options" | "get" | "put" | "post" | "delete" | "head" | "patch" | "trace" | "connect" | undefined;
|
|
325
|
-
'x-post-response'?: string | undefined;
|
|
326
323
|
'x-codeSamples'?: unknown;
|
|
327
324
|
'x-code-samples'?: unknown;
|
|
328
325
|
'x-custom-examples'?: unknown;
|
|
326
|
+
'x-scalar-stability'?: unknown;
|
|
327
|
+
method?: "options" | "connect" | "delete" | "get" | "head" | "patch" | "post" | "put" | "trace" | undefined;
|
|
328
|
+
'x-post-response'?: string | undefined;
|
|
329
329
|
}>;
|
|
330
330
|
//# sourceMappingURL=operation.d.ts.map
|
|
@@ -53,10 +53,10 @@ export declare const oasParameterSchema: z.ZodObject<{
|
|
|
53
53
|
summary?: string | undefined;
|
|
54
54
|
externalValue?: string | undefined;
|
|
55
55
|
}> | undefined;
|
|
56
|
+
schema?: unknown;
|
|
56
57
|
content?: unknown;
|
|
57
58
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
58
59
|
explode?: boolean | undefined;
|
|
59
|
-
schema?: unknown;
|
|
60
60
|
}, {
|
|
61
61
|
name: string;
|
|
62
62
|
in: "cookie" | "path" | "query" | "header";
|
|
@@ -69,10 +69,10 @@ export declare const oasParameterSchema: z.ZodObject<{
|
|
|
69
69
|
summary?: string | undefined;
|
|
70
70
|
externalValue?: string | undefined;
|
|
71
71
|
}> | undefined;
|
|
72
|
+
schema?: unknown;
|
|
72
73
|
content?: unknown;
|
|
73
74
|
style?: "matrix" | "simple" | "form" | "label" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
74
75
|
explode?: boolean | undefined;
|
|
75
|
-
schema?: unknown;
|
|
76
76
|
}>;
|
|
77
77
|
export type RequestParameter = z.infer<typeof oasParameterSchema>;
|
|
78
78
|
export type RequestParameterPayload = z.input<typeof oasParameterSchema>;
|
|
@@ -50,8 +50,8 @@ export declare const requestExampleParametersSchema: z.ZodEffects<z.ZodObject<{
|
|
|
50
50
|
key?: string | undefined;
|
|
51
51
|
format?: string | undefined;
|
|
52
52
|
examples?: any[] | undefined;
|
|
53
|
-
enabled?: boolean | undefined;
|
|
54
53
|
file?: any;
|
|
54
|
+
enabled?: boolean | undefined;
|
|
55
55
|
nullable?: boolean | undefined;
|
|
56
56
|
}>, {
|
|
57
57
|
value: string;
|
|
@@ -80,8 +80,8 @@ export declare const requestExampleParametersSchema: z.ZodEffects<z.ZodObject<{
|
|
|
80
80
|
key?: string | undefined;
|
|
81
81
|
format?: string | undefined;
|
|
82
82
|
examples?: any[] | undefined;
|
|
83
|
-
enabled?: boolean | undefined;
|
|
84
83
|
file?: any;
|
|
84
|
+
enabled?: boolean | undefined;
|
|
85
85
|
nullable?: boolean | undefined;
|
|
86
86
|
}>;
|
|
87
87
|
/** Convert the array of parameters to an object keyed by the parameter name */
|
|
@@ -215,8 +215,8 @@ export declare const exampleRequestBodySchema: z.ZodObject<{
|
|
|
215
215
|
key?: string | undefined;
|
|
216
216
|
format?: string | undefined;
|
|
217
217
|
examples?: any[] | undefined;
|
|
218
|
-
enabled?: boolean | undefined;
|
|
219
218
|
file?: any;
|
|
219
|
+
enabled?: boolean | undefined;
|
|
220
220
|
nullable?: boolean | undefined;
|
|
221
221
|
}>, {
|
|
222
222
|
value: string;
|
|
@@ -245,8 +245,8 @@ export declare const exampleRequestBodySchema: z.ZodObject<{
|
|
|
245
245
|
key?: string | undefined;
|
|
246
246
|
format?: string | undefined;
|
|
247
247
|
examples?: any[] | undefined;
|
|
248
|
-
enabled?: boolean | undefined;
|
|
249
248
|
file?: any;
|
|
249
|
+
enabled?: boolean | undefined;
|
|
250
250
|
nullable?: boolean | undefined;
|
|
251
251
|
}>, "many">>;
|
|
252
252
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -280,8 +280,8 @@ export declare const exampleRequestBodySchema: z.ZodObject<{
|
|
|
280
280
|
key?: string | undefined;
|
|
281
281
|
format?: string | undefined;
|
|
282
282
|
examples?: any[] | undefined;
|
|
283
|
-
enabled?: boolean | undefined;
|
|
284
283
|
file?: any;
|
|
284
|
+
enabled?: boolean | undefined;
|
|
285
285
|
nullable?: boolean | undefined;
|
|
286
286
|
}[] | undefined;
|
|
287
287
|
encoding?: "form-data" | "urlencoded" | undefined;
|
|
@@ -330,8 +330,8 @@ export declare const exampleRequestBodySchema: z.ZodObject<{
|
|
|
330
330
|
key?: string | undefined;
|
|
331
331
|
format?: string | undefined;
|
|
332
332
|
examples?: any[] | undefined;
|
|
333
|
-
enabled?: boolean | undefined;
|
|
334
333
|
file?: any;
|
|
334
|
+
enabled?: boolean | undefined;
|
|
335
335
|
nullable?: boolean | undefined;
|
|
336
336
|
}[] | undefined;
|
|
337
337
|
encoding?: "form-data" | "urlencoded" | undefined;
|
|
@@ -366,14 +366,14 @@ export declare const xScalarExampleBodySchema: z.ZodObject<{
|
|
|
366
366
|
}>>>;
|
|
367
367
|
}, "strip", z.ZodTypeAny, {
|
|
368
368
|
content: string | Record<string, any>;
|
|
369
|
-
encoding: "binary" | "application/json" | "
|
|
369
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
370
370
|
file?: {
|
|
371
371
|
url: string;
|
|
372
372
|
base64?: string | undefined;
|
|
373
373
|
} | null | undefined;
|
|
374
374
|
}, {
|
|
375
375
|
content: string | Record<string, any>;
|
|
376
|
-
encoding: "binary" | "application/json" | "
|
|
376
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
377
377
|
file?: {
|
|
378
378
|
url: string;
|
|
379
379
|
base64?: string | undefined;
|
|
@@ -443,8 +443,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
443
443
|
key?: string | undefined;
|
|
444
444
|
format?: string | undefined;
|
|
445
445
|
examples?: any[] | undefined;
|
|
446
|
-
enabled?: boolean | undefined;
|
|
447
446
|
file?: any;
|
|
447
|
+
enabled?: boolean | undefined;
|
|
448
448
|
nullable?: boolean | undefined;
|
|
449
449
|
}>, {
|
|
450
450
|
value: string;
|
|
@@ -473,8 +473,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
473
473
|
key?: string | undefined;
|
|
474
474
|
format?: string | undefined;
|
|
475
475
|
examples?: any[] | undefined;
|
|
476
|
-
enabled?: boolean | undefined;
|
|
477
476
|
file?: any;
|
|
477
|
+
enabled?: boolean | undefined;
|
|
478
478
|
nullable?: boolean | undefined;
|
|
479
479
|
}>, "many">>;
|
|
480
480
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -508,8 +508,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
508
508
|
key?: string | undefined;
|
|
509
509
|
format?: string | undefined;
|
|
510
510
|
examples?: any[] | undefined;
|
|
511
|
-
enabled?: boolean | undefined;
|
|
512
511
|
file?: any;
|
|
512
|
+
enabled?: boolean | undefined;
|
|
513
513
|
nullable?: boolean | undefined;
|
|
514
514
|
}[] | undefined;
|
|
515
515
|
encoding?: "form-data" | "urlencoded" | undefined;
|
|
@@ -558,8 +558,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
558
558
|
key?: string | undefined;
|
|
559
559
|
format?: string | undefined;
|
|
560
560
|
examples?: any[] | undefined;
|
|
561
|
-
enabled?: boolean | undefined;
|
|
562
561
|
file?: any;
|
|
562
|
+
enabled?: boolean | undefined;
|
|
563
563
|
nullable?: boolean | undefined;
|
|
564
564
|
}[] | undefined;
|
|
565
565
|
encoding?: "form-data" | "urlencoded" | undefined;
|
|
@@ -614,8 +614,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
614
614
|
key?: string | undefined;
|
|
615
615
|
format?: string | undefined;
|
|
616
616
|
examples?: any[] | undefined;
|
|
617
|
-
enabled?: boolean | undefined;
|
|
618
617
|
file?: any;
|
|
618
|
+
enabled?: boolean | undefined;
|
|
619
619
|
nullable?: boolean | undefined;
|
|
620
620
|
}>, {
|
|
621
621
|
value: string;
|
|
@@ -644,8 +644,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
644
644
|
key?: string | undefined;
|
|
645
645
|
format?: string | undefined;
|
|
646
646
|
examples?: any[] | undefined;
|
|
647
|
-
enabled?: boolean | undefined;
|
|
648
647
|
file?: any;
|
|
648
|
+
enabled?: boolean | undefined;
|
|
649
649
|
nullable?: boolean | undefined;
|
|
650
650
|
}>, "many">>;
|
|
651
651
|
query: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -690,8 +690,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
690
690
|
key?: string | undefined;
|
|
691
691
|
format?: string | undefined;
|
|
692
692
|
examples?: any[] | undefined;
|
|
693
|
-
enabled?: boolean | undefined;
|
|
694
693
|
file?: any;
|
|
694
|
+
enabled?: boolean | undefined;
|
|
695
695
|
nullable?: boolean | undefined;
|
|
696
696
|
}>, {
|
|
697
697
|
value: string;
|
|
@@ -720,8 +720,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
720
720
|
key?: string | undefined;
|
|
721
721
|
format?: string | undefined;
|
|
722
722
|
examples?: any[] | undefined;
|
|
723
|
-
enabled?: boolean | undefined;
|
|
724
723
|
file?: any;
|
|
724
|
+
enabled?: boolean | undefined;
|
|
725
725
|
nullable?: boolean | undefined;
|
|
726
726
|
}>, "many">>;
|
|
727
727
|
headers: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -766,8 +766,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
766
766
|
key?: string | undefined;
|
|
767
767
|
format?: string | undefined;
|
|
768
768
|
examples?: any[] | undefined;
|
|
769
|
-
enabled?: boolean | undefined;
|
|
770
769
|
file?: any;
|
|
770
|
+
enabled?: boolean | undefined;
|
|
771
771
|
nullable?: boolean | undefined;
|
|
772
772
|
}>, {
|
|
773
773
|
value: string;
|
|
@@ -796,8 +796,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
796
796
|
key?: string | undefined;
|
|
797
797
|
format?: string | undefined;
|
|
798
798
|
examples?: any[] | undefined;
|
|
799
|
-
enabled?: boolean | undefined;
|
|
800
799
|
file?: any;
|
|
800
|
+
enabled?: boolean | undefined;
|
|
801
801
|
nullable?: boolean | undefined;
|
|
802
802
|
}>, "many">>;
|
|
803
803
|
cookies: z.ZodDefault<z.ZodArray<z.ZodEffects<z.ZodObject<{
|
|
@@ -842,8 +842,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
842
842
|
key?: string | undefined;
|
|
843
843
|
format?: string | undefined;
|
|
844
844
|
examples?: any[] | undefined;
|
|
845
|
-
enabled?: boolean | undefined;
|
|
846
845
|
file?: any;
|
|
846
|
+
enabled?: boolean | undefined;
|
|
847
847
|
nullable?: boolean | undefined;
|
|
848
848
|
}>, {
|
|
849
849
|
value: string;
|
|
@@ -872,8 +872,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
872
872
|
key?: string | undefined;
|
|
873
873
|
format?: string | undefined;
|
|
874
874
|
examples?: any[] | undefined;
|
|
875
|
-
enabled?: boolean | undefined;
|
|
876
875
|
file?: any;
|
|
876
|
+
enabled?: boolean | undefined;
|
|
877
877
|
nullable?: boolean | undefined;
|
|
878
878
|
}>, "many">>;
|
|
879
879
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -954,8 +954,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
954
954
|
key?: string | undefined;
|
|
955
955
|
format?: string | undefined;
|
|
956
956
|
examples?: any[] | undefined;
|
|
957
|
-
enabled?: boolean | undefined;
|
|
958
957
|
file?: any;
|
|
958
|
+
enabled?: boolean | undefined;
|
|
959
959
|
nullable?: boolean | undefined;
|
|
960
960
|
}[] | undefined;
|
|
961
961
|
query?: {
|
|
@@ -970,8 +970,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
970
970
|
key?: string | undefined;
|
|
971
971
|
format?: string | undefined;
|
|
972
972
|
examples?: any[] | undefined;
|
|
973
|
-
enabled?: boolean | undefined;
|
|
974
973
|
file?: any;
|
|
974
|
+
enabled?: boolean | undefined;
|
|
975
975
|
nullable?: boolean | undefined;
|
|
976
976
|
}[] | undefined;
|
|
977
977
|
headers?: {
|
|
@@ -986,8 +986,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
986
986
|
key?: string | undefined;
|
|
987
987
|
format?: string | undefined;
|
|
988
988
|
examples?: any[] | undefined;
|
|
989
|
-
enabled?: boolean | undefined;
|
|
990
989
|
file?: any;
|
|
990
|
+
enabled?: boolean | undefined;
|
|
991
991
|
nullable?: boolean | undefined;
|
|
992
992
|
}[] | undefined;
|
|
993
993
|
cookies?: {
|
|
@@ -1002,8 +1002,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1002
1002
|
key?: string | undefined;
|
|
1003
1003
|
format?: string | undefined;
|
|
1004
1004
|
examples?: any[] | undefined;
|
|
1005
|
-
enabled?: boolean | undefined;
|
|
1006
1005
|
file?: any;
|
|
1006
|
+
enabled?: boolean | undefined;
|
|
1007
1007
|
nullable?: boolean | undefined;
|
|
1008
1008
|
}[] | undefined;
|
|
1009
1009
|
}>>>;
|
|
@@ -1013,34 +1013,6 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1013
1013
|
uid: string & z.BRAND<"example">;
|
|
1014
1014
|
name: string;
|
|
1015
1015
|
type: "requestExample";
|
|
1016
|
-
body: {
|
|
1017
|
-
activeBody: "binary" | "formData" | "raw";
|
|
1018
|
-
binary?: Blob | undefined;
|
|
1019
|
-
formData?: {
|
|
1020
|
-
value: {
|
|
1021
|
-
value: string;
|
|
1022
|
-
key: string;
|
|
1023
|
-
enabled: boolean;
|
|
1024
|
-
minimum?: number | undefined;
|
|
1025
|
-
type?: string | string[] | undefined;
|
|
1026
|
-
maximum?: number | undefined;
|
|
1027
|
-
description?: string | undefined;
|
|
1028
|
-
default?: any;
|
|
1029
|
-
required?: boolean | undefined;
|
|
1030
|
-
enum?: string[] | undefined;
|
|
1031
|
-
format?: string | undefined;
|
|
1032
|
-
examples?: any[] | undefined;
|
|
1033
|
-
file?: any;
|
|
1034
|
-
nullable?: boolean | undefined;
|
|
1035
|
-
}[];
|
|
1036
|
-
encoding: "form-data" | "urlencoded";
|
|
1037
|
-
} | undefined;
|
|
1038
|
-
raw?: {
|
|
1039
|
-
value: string;
|
|
1040
|
-
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
1041
|
-
mimeType?: string | undefined;
|
|
1042
|
-
} | undefined;
|
|
1043
|
-
};
|
|
1044
1016
|
parameters: {
|
|
1045
1017
|
path: {
|
|
1046
1018
|
value: string;
|
|
@@ -1107,17 +1079,14 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1107
1079
|
nullable?: boolean | undefined;
|
|
1108
1080
|
}[];
|
|
1109
1081
|
};
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
}, {
|
|
1113
|
-
uid?: string | undefined;
|
|
1114
|
-
name?: string | undefined;
|
|
1115
|
-
type?: "requestExample" | undefined;
|
|
1116
|
-
body?: {
|
|
1082
|
+
body: {
|
|
1083
|
+
activeBody: "binary" | "formData" | "raw";
|
|
1117
1084
|
binary?: Blob | undefined;
|
|
1118
1085
|
formData?: {
|
|
1119
|
-
value
|
|
1120
|
-
value
|
|
1086
|
+
value: {
|
|
1087
|
+
value: string;
|
|
1088
|
+
key: string;
|
|
1089
|
+
enabled: boolean;
|
|
1121
1090
|
minimum?: number | undefined;
|
|
1122
1091
|
type?: string | string[] | undefined;
|
|
1123
1092
|
maximum?: number | undefined;
|
|
@@ -1125,22 +1094,25 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1125
1094
|
default?: any;
|
|
1126
1095
|
required?: boolean | undefined;
|
|
1127
1096
|
enum?: string[] | undefined;
|
|
1128
|
-
key?: string | undefined;
|
|
1129
1097
|
format?: string | undefined;
|
|
1130
1098
|
examples?: any[] | undefined;
|
|
1131
|
-
enabled?: boolean | undefined;
|
|
1132
1099
|
file?: any;
|
|
1133
1100
|
nullable?: boolean | undefined;
|
|
1134
|
-
}[]
|
|
1135
|
-
encoding
|
|
1101
|
+
}[];
|
|
1102
|
+
encoding: "form-data" | "urlencoded";
|
|
1136
1103
|
} | undefined;
|
|
1137
1104
|
raw?: {
|
|
1105
|
+
value: string;
|
|
1138
1106
|
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
1139
|
-
value?: string | undefined;
|
|
1140
1107
|
mimeType?: string | undefined;
|
|
1141
1108
|
} | undefined;
|
|
1142
|
-
|
|
1143
|
-
|
|
1109
|
+
};
|
|
1110
|
+
requestUid?: (string & z.BRAND<"operation">) | undefined;
|
|
1111
|
+
serverVariables?: Record<string, string[]> | undefined;
|
|
1112
|
+
}, {
|
|
1113
|
+
uid?: string | undefined;
|
|
1114
|
+
name?: string | undefined;
|
|
1115
|
+
type?: "requestExample" | undefined;
|
|
1144
1116
|
parameters?: {
|
|
1145
1117
|
path?: {
|
|
1146
1118
|
value?: string | undefined;
|
|
@@ -1154,8 +1126,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1154
1126
|
key?: string | undefined;
|
|
1155
1127
|
format?: string | undefined;
|
|
1156
1128
|
examples?: any[] | undefined;
|
|
1157
|
-
enabled?: boolean | undefined;
|
|
1158
1129
|
file?: any;
|
|
1130
|
+
enabled?: boolean | undefined;
|
|
1159
1131
|
nullable?: boolean | undefined;
|
|
1160
1132
|
}[] | undefined;
|
|
1161
1133
|
query?: {
|
|
@@ -1170,8 +1142,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1170
1142
|
key?: string | undefined;
|
|
1171
1143
|
format?: string | undefined;
|
|
1172
1144
|
examples?: any[] | undefined;
|
|
1173
|
-
enabled?: boolean | undefined;
|
|
1174
1145
|
file?: any;
|
|
1146
|
+
enabled?: boolean | undefined;
|
|
1175
1147
|
nullable?: boolean | undefined;
|
|
1176
1148
|
}[] | undefined;
|
|
1177
1149
|
headers?: {
|
|
@@ -1186,8 +1158,8 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1186
1158
|
key?: string | undefined;
|
|
1187
1159
|
format?: string | undefined;
|
|
1188
1160
|
examples?: any[] | undefined;
|
|
1189
|
-
enabled?: boolean | undefined;
|
|
1190
1161
|
file?: any;
|
|
1162
|
+
enabled?: boolean | undefined;
|
|
1191
1163
|
nullable?: boolean | undefined;
|
|
1192
1164
|
}[] | undefined;
|
|
1193
1165
|
cookies?: {
|
|
@@ -1202,11 +1174,39 @@ export declare const requestExampleSchema: z.ZodObject<{
|
|
|
1202
1174
|
key?: string | undefined;
|
|
1203
1175
|
format?: string | undefined;
|
|
1204
1176
|
examples?: any[] | undefined;
|
|
1205
|
-
enabled?: boolean | undefined;
|
|
1206
1177
|
file?: any;
|
|
1178
|
+
enabled?: boolean | undefined;
|
|
1207
1179
|
nullable?: boolean | undefined;
|
|
1208
1180
|
}[] | undefined;
|
|
1209
1181
|
} | undefined;
|
|
1182
|
+
body?: {
|
|
1183
|
+
binary?: Blob | undefined;
|
|
1184
|
+
formData?: {
|
|
1185
|
+
value?: {
|
|
1186
|
+
value?: string | undefined;
|
|
1187
|
+
minimum?: number | undefined;
|
|
1188
|
+
type?: string | string[] | undefined;
|
|
1189
|
+
maximum?: number | undefined;
|
|
1190
|
+
description?: string | undefined;
|
|
1191
|
+
default?: any;
|
|
1192
|
+
required?: boolean | undefined;
|
|
1193
|
+
enum?: string[] | undefined;
|
|
1194
|
+
key?: string | undefined;
|
|
1195
|
+
format?: string | undefined;
|
|
1196
|
+
examples?: any[] | undefined;
|
|
1197
|
+
file?: any;
|
|
1198
|
+
enabled?: boolean | undefined;
|
|
1199
|
+
nullable?: boolean | undefined;
|
|
1200
|
+
}[] | undefined;
|
|
1201
|
+
encoding?: "form-data" | "urlencoded" | undefined;
|
|
1202
|
+
} | undefined;
|
|
1203
|
+
raw?: {
|
|
1204
|
+
encoding: "xml" | "json" | "text" | "html" | "javascript" | "yaml" | "edn";
|
|
1205
|
+
value?: string | undefined;
|
|
1206
|
+
mimeType?: string | undefined;
|
|
1207
|
+
} | undefined;
|
|
1208
|
+
activeBody?: "binary" | "formData" | "raw" | undefined;
|
|
1209
|
+
} | undefined;
|
|
1210
1210
|
requestUid?: string | undefined;
|
|
1211
1211
|
serverVariables?: Record<string, string[]> | undefined;
|
|
1212
1212
|
}>;
|
|
@@ -1236,14 +1236,14 @@ export declare const xScalarExampleSchema: z.ZodObject<{
|
|
|
1236
1236
|
}>>>;
|
|
1237
1237
|
}, "strip", z.ZodTypeAny, {
|
|
1238
1238
|
content: string | Record<string, any>;
|
|
1239
|
-
encoding: "binary" | "application/json" | "
|
|
1239
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
1240
1240
|
file?: {
|
|
1241
1241
|
url: string;
|
|
1242
1242
|
base64?: string | undefined;
|
|
1243
1243
|
} | null | undefined;
|
|
1244
1244
|
}, {
|
|
1245
1245
|
content: string | Record<string, any>;
|
|
1246
|
-
encoding: "binary" | "application/json" | "
|
|
1246
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
1247
1247
|
file?: {
|
|
1248
1248
|
url: string;
|
|
1249
1249
|
base64?: string | undefined;
|
|
@@ -1275,7 +1275,7 @@ export declare const xScalarExampleSchema: z.ZodObject<{
|
|
|
1275
1275
|
name?: string | undefined;
|
|
1276
1276
|
body?: {
|
|
1277
1277
|
content: string | Record<string, any>;
|
|
1278
|
-
encoding: "binary" | "application/json" | "
|
|
1278
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
1279
1279
|
file?: {
|
|
1280
1280
|
url: string;
|
|
1281
1281
|
base64?: string | undefined;
|
|
@@ -1291,7 +1291,7 @@ export declare const xScalarExampleSchema: z.ZodObject<{
|
|
|
1291
1291
|
name?: string | undefined;
|
|
1292
1292
|
body?: {
|
|
1293
1293
|
content: string | Record<string, any>;
|
|
1294
|
-
encoding: "binary" | "application/json" | "
|
|
1294
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
1295
1295
|
file?: {
|
|
1296
1296
|
url: string;
|
|
1297
1297
|
base64?: string | undefined;
|
|
@@ -1314,7 +1314,7 @@ export declare function convertExampleToXScalar(example: RequestExample): {
|
|
|
1314
1314
|
name?: string | undefined;
|
|
1315
1315
|
body?: {
|
|
1316
1316
|
content: string | Record<string, any>;
|
|
1317
|
-
encoding: "binary" | "application/json" | "
|
|
1317
|
+
encoding: "binary" | "application/json" | "text/plain" | "text/html" | "application/javascript" | "application/xml" | "application/yaml" | "application/edn" | "application/octet-stream" | "application/x-www-form-urlencoded" | "multipart/form-data";
|
|
1318
1318
|
file?: {
|
|
1319
1319
|
url: string;
|
|
1320
1320
|
base64?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-examples.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/request-examples.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"request-examples.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/request-examples.ts"],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