@scalar/oas-utils 0.2.107 → 0.2.109
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 +26 -0
- package/dist/entities/spec/collection.d.ts +157 -113
- package/dist/entities/spec/collection.d.ts.map +1 -1
- package/dist/entities/spec/collection.js +4 -1
- package/dist/entities/spec/index.js +1 -1
- package/dist/entities/spec/operation.d.ts +12 -6
- package/dist/entities/spec/operation.d.ts.map +1 -1
- package/dist/entities/spec/request-examples.d.ts.map +1 -1
- package/dist/entities/spec/request-examples.js +14 -11
- package/dist/entities/spec/requests.d.ts +24 -12
- package/dist/entities/spec/requests.d.ts.map +1 -1
- package/dist/entities/spec/spec-objects.d.ts +145 -73
- package/dist/entities/spec/spec-objects.d.ts.map +1 -1
- package/dist/entities/spec/spec-objects.js +62 -42
- package/dist/helpers/fetchWithProxyFallback.d.ts.map +1 -1
- package/dist/helpers/findVariables.d.ts.map +1 -1
- package/dist/helpers/findVariables.js +1 -1
- package/dist/helpers/httpMethods.d.ts.map +1 -1
- package/dist/helpers/is-defined.d.ts.map +1 -1
- package/dist/helpers/iterateTitle.d.ts.map +1 -1
- package/dist/helpers/makeUrlAbsolute.d.ts.map +1 -1
- package/dist/helpers/makeUrlAbsolute.js +1 -4
- package/dist/helpers/merge-urls.d.ts.map +1 -1
- package/dist/helpers/normalizeMimeTypeObject.d.ts +1 -0
- package/dist/helpers/normalizeMimeTypeObject.d.ts.map +1 -1
- package/dist/helpers/object.d.ts.map +1 -1
- package/dist/helpers/parse.d.ts.map +1 -1
- package/dist/helpers/prettyPrintJson.d.ts.map +1 -1
- package/dist/helpers/replaceVariables.d.ts.map +1 -1
- package/dist/helpers/replaceVariables.js +1 -3
- package/dist/helpers/ssrState.d.ts.map +1 -1
- package/dist/helpers/ssrState.js +1 -3
- package/dist/migrations/local-storage.d.ts.map +1 -1
- package/dist/migrations/semver.d.ts.map +1 -1
- package/dist/migrations/semver.js +1 -3
- package/dist/migrations/v-0.0.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.1.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.1.0/migration.js +1 -4
- package/dist/migrations/v-2.1.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.2.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.2.0/migration.js +2 -4
- package/dist/migrations/v-2.2.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.3.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.3.0/migration.js +3 -8
- package/dist/migrations/v-2.3.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.4.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.4.0/types.generated.d.ts.map +1 -1
- package/dist/migrations/v-2.5.0/migration.d.ts.map +1 -1
- package/dist/migrations/v-2.5.0/migration.js +4 -0
- package/dist/spec-getters/getExampleFromSchema.d.ts.map +1 -1
- package/dist/spec-getters/getExampleFromSchema.js +8 -22
- package/dist/spec-getters/getParametersFromOperation.d.ts.map +1 -1
- package/dist/spec-getters/getParametersFromOperation.js +1 -4
- package/dist/spec-getters/getRequestBodyFromOperation.d.ts.map +1 -1
- package/dist/spec-getters/getRequestBodyFromOperation.js +4 -9
- package/dist/spec-getters/getServerVariableExamples.js +3 -1
- package/dist/transforms/import-spec.d.ts +1 -0
- package/dist/transforms/import-spec.d.ts.map +1 -1
- package/dist/transforms/import-spec.js +11 -3
- package/dist/transforms/index.d.ts +0 -1
- package/dist/transforms/index.d.ts.map +1 -1
- package/dist/transforms/index.js +0 -1
- package/package.json +7 -7
- package/dist/transforms/export-spec.d.ts +0 -17
- package/dist/transforms/export-spec.d.ts.map +0 -1
- package/dist/transforms/export-spec.js +0 -73
|
@@ -116,15 +116,21 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
116
116
|
/**
|
|
117
117
|
* External documentation object
|
|
118
118
|
*/
|
|
119
|
-
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
120
|
-
description: z.ZodOptional<z.ZodString
|
|
121
|
-
url: z.
|
|
119
|
+
externalDocs: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
120
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
121
|
+
url: z.ZodString;
|
|
122
122
|
}, "strip", z.ZodTypeAny, {
|
|
123
123
|
url: string;
|
|
124
124
|
description?: string | undefined;
|
|
125
125
|
}, {
|
|
126
|
+
url: string;
|
|
127
|
+
description?: unknown;
|
|
128
|
+
}>, {
|
|
129
|
+
url: string;
|
|
126
130
|
description?: string | undefined;
|
|
127
|
-
|
|
131
|
+
}, {
|
|
132
|
+
url: string;
|
|
133
|
+
description?: unknown;
|
|
128
134
|
}>>;
|
|
129
135
|
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
130
136
|
/** Response formats */
|
|
@@ -263,8 +269,8 @@ export declare const oasRequestSchema: z.ZodObject<{
|
|
|
263
269
|
description?: string | undefined;
|
|
264
270
|
summary?: string | undefined;
|
|
265
271
|
externalDocs?: {
|
|
266
|
-
|
|
267
|
-
|
|
272
|
+
url: string;
|
|
273
|
+
description?: unknown;
|
|
268
274
|
} | undefined;
|
|
269
275
|
'x-internal'?: boolean | undefined;
|
|
270
276
|
'x-scalar-ignore'?: boolean | undefined;
|
|
@@ -396,15 +402,21 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
396
402
|
/**
|
|
397
403
|
* External documentation object
|
|
398
404
|
*/
|
|
399
|
-
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
400
|
-
description: z.ZodOptional<z.ZodString
|
|
401
|
-
url: z.
|
|
405
|
+
externalDocs: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
406
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
407
|
+
url: z.ZodString;
|
|
402
408
|
}, "strip", z.ZodTypeAny, {
|
|
403
409
|
url: string;
|
|
404
410
|
description?: string | undefined;
|
|
405
411
|
}, {
|
|
412
|
+
url: string;
|
|
413
|
+
description?: unknown;
|
|
414
|
+
}>, {
|
|
415
|
+
url: string;
|
|
406
416
|
description?: string | undefined;
|
|
407
|
-
|
|
417
|
+
}, {
|
|
418
|
+
url: string;
|
|
419
|
+
description?: unknown;
|
|
408
420
|
}>>;
|
|
409
421
|
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
410
422
|
/** Response formats */
|
|
@@ -552,8 +564,8 @@ export declare const requestSchema: z.ZodObject<z.objectUtil.extendShape<Omit<{
|
|
|
552
564
|
description?: string | undefined;
|
|
553
565
|
summary?: string | undefined;
|
|
554
566
|
externalDocs?: {
|
|
555
|
-
|
|
556
|
-
|
|
567
|
+
url: string;
|
|
568
|
+
description?: unknown;
|
|
557
569
|
} | undefined;
|
|
558
570
|
'x-internal'?: boolean | undefined;
|
|
559
571
|
'x-scalar-ignore'?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/requests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,oBAAoB,CAAA;AAI9E,eAAO,MAAM,cAAc,2FAA4F,CAAA;AAEvH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,0BAA0B;IAC1B,MAAM,EAAE,aAAa,CAAA;IACrB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,cAAc,CAAA;IACvB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAMD,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB;IAC3B;;;;;OAKG;;IAEH,kDAAkD;;IAElD,mHAAmH;;IAEnH;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;OAEG
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/requests.ts"],"names":[],"mappings":"AAEA,OAAO,EAAkB,CAAC,EAAE,MAAM,KAAK,CAAA;AAGvC,OAAO,EAAE,KAAK,cAAc,EAAwB,MAAM,oBAAoB,CAAA;AAI9E,eAAO,MAAM,cAAc,2FAA4F,CAAA;AAEvH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAA;AAE3D,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG;IACzD,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC/B,wCAAwC;IACxC,gBAAgB,EAAE,MAAM,EAAE,CAAA;IAC1B,kCAAkC;IAClC,QAAQ,EAAE,MAAM,CAAA;IAChB,wBAAwB;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAA;IACd,0BAA0B;IAC1B,MAAM,EAAE,aAAa,CAAA;IACrB,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;AAED,iEAAiE;AACjE,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,cAAc,CAAA;IACvB,QAAQ,EAAE,gBAAgB,CAAA;IAC1B,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAMD,2CAA2C;AAC3C,eAAO,MAAM,gBAAgB;IAC3B;;;;;OAKG;;IAEH,kDAAkD;;IAElD,mHAAmH;;IAEnH;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;IAGH,uBAAuB;;IAEvB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEvB,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG2B,CAAA;AA0BnD,8CAA8C;AAC9C,eAAO,MAAM,aAAa;IA3ExB;;;;;OAKG;;IAEH,kDAAkD;;IAElD,mHAAmH;;IAEnH;;;;OAIG;;IAEH;;;;;;OAMG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;IAGH,uBAAuB;;IAEvB,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEvB,sBAAsB;;;;;;IAetB,eAAe;;IAEf,qBAAqB;;IAErB,kDAAkD;;IAElD,oCAAoC;;IAEpC,uDAAuD;;IAEvD,+DAA+D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAK6C,CAAA;AAE9G,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAA"}
|
|
@@ -1,108 +1,148 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
/**
|
|
3
|
+
* Removes undefined values from an object.
|
|
4
|
+
*
|
|
5
|
+
* Can be used as a transform function for any Zod schema.
|
|
6
|
+
*/
|
|
7
|
+
export declare const omitUndefinedValues: <T extends object>(data: T) => T;
|
|
8
|
+
/**
|
|
9
|
+
* License Object
|
|
10
|
+
*
|
|
3
11
|
* License information for the exposed API.
|
|
4
12
|
*
|
|
5
|
-
* @see https://
|
|
13
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#license-object
|
|
6
14
|
*/
|
|
7
|
-
export declare const oasLicenseSchema: z.ZodObject<{
|
|
15
|
+
export declare const oasLicenseSchema: z.ZodEffects<z.ZodObject<{
|
|
8
16
|
/** REQUIRED. The license name used for the API. */
|
|
9
|
-
name: z.
|
|
17
|
+
name: z.ZodCatch<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
10
18
|
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
11
|
-
identifier: z.ZodOptional<z.ZodString
|
|
19
|
+
identifier: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
12
20
|
/**
|
|
13
|
-
* A
|
|
14
|
-
* is mutually exclusive of the identifier field.
|
|
21
|
+
* A URI for the license used for the API. This MUST be in the form of a URI. The url field is mutually exclusive of the identifier field.
|
|
15
22
|
*/
|
|
16
|
-
url: z.ZodOptional<z.ZodString
|
|
23
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
17
24
|
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
name
|
|
25
|
+
name?: string | null | undefined;
|
|
19
26
|
identifier?: string | undefined;
|
|
20
27
|
url?: string | undefined;
|
|
21
28
|
}, {
|
|
22
|
-
name?:
|
|
29
|
+
name?: unknown;
|
|
30
|
+
identifier?: unknown;
|
|
31
|
+
url?: unknown;
|
|
32
|
+
}>, {
|
|
33
|
+
name?: string | null | undefined;
|
|
23
34
|
identifier?: string | undefined;
|
|
24
35
|
url?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
name?: unknown;
|
|
38
|
+
identifier?: unknown;
|
|
39
|
+
url?: unknown;
|
|
25
40
|
}>;
|
|
26
41
|
/**
|
|
27
|
-
* Contact
|
|
42
|
+
* Contact Object
|
|
43
|
+
*
|
|
28
44
|
* Contact information for the exposed API.
|
|
29
45
|
*
|
|
30
|
-
* @see https://
|
|
46
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#contact-object
|
|
31
47
|
*/
|
|
32
|
-
export declare const oasContactSchema: z.ZodObject<{
|
|
48
|
+
export declare const oasContactSchema: z.ZodEffects<z.ZodObject<{
|
|
33
49
|
/** The identifying name of the contact person/organization. */
|
|
34
50
|
name: z.ZodOptional<z.ZodString>;
|
|
35
51
|
/** The URL pointing to the contact information. This MUST be in the form of a URL. */
|
|
36
|
-
url: z.ZodOptional<z.ZodString
|
|
52
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
37
53
|
/** The email address of the contact person/organization. This MUST be in the form of an email address. */
|
|
38
|
-
email: z.ZodOptional<z.ZodString
|
|
54
|
+
email: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
39
55
|
}, "strip", z.ZodTypeAny, {
|
|
40
56
|
name?: string | undefined;
|
|
41
57
|
url?: string | undefined;
|
|
42
58
|
email?: string | undefined;
|
|
43
59
|
}, {
|
|
60
|
+
name?: string | undefined;
|
|
61
|
+
url?: unknown;
|
|
62
|
+
email?: unknown;
|
|
63
|
+
}>, {
|
|
44
64
|
name?: string | undefined;
|
|
45
65
|
url?: string | undefined;
|
|
46
66
|
email?: string | undefined;
|
|
67
|
+
}, {
|
|
68
|
+
name?: string | undefined;
|
|
69
|
+
url?: unknown;
|
|
70
|
+
email?: unknown;
|
|
47
71
|
}>;
|
|
48
72
|
/**
|
|
49
|
-
* Info
|
|
73
|
+
* Info Object
|
|
74
|
+
*
|
|
50
75
|
* The object provides metadata about the API. The metadata MAY be used by the clients if needed,
|
|
51
76
|
* and MAY be presented in editing or documentation generation tools for convenience.
|
|
52
77
|
*
|
|
53
|
-
* @see https://
|
|
78
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#info-object
|
|
54
79
|
*/
|
|
55
|
-
export declare const oasInfoSchema: z.ZodObject<{
|
|
80
|
+
export declare const oasInfoSchema: z.ZodEffects<z.ZodObject<{
|
|
56
81
|
/** REQUIRED. The title of the API. */
|
|
57
|
-
title: z.
|
|
82
|
+
title: z.ZodCatch<z.ZodString>;
|
|
58
83
|
/** A short summary of the API. */
|
|
59
|
-
summary: z.ZodOptional<z.ZodString
|
|
84
|
+
summary: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
60
85
|
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
61
|
-
description: z.ZodOptional<z.ZodString
|
|
86
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
62
87
|
/** A URL to the Terms of Service for the API. This MUST be in the form of a URL. */
|
|
63
|
-
termsOfService: z.ZodOptional<z.ZodString
|
|
88
|
+
termsOfService: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
64
89
|
/** The contact information for the exposed API. */
|
|
65
|
-
contact: z.ZodOptional<z.ZodObject<{
|
|
90
|
+
contact: z.ZodCatch<z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
66
91
|
/** The identifying name of the contact person/organization. */
|
|
67
92
|
name: z.ZodOptional<z.ZodString>;
|
|
68
93
|
/** The URL pointing to the contact information. This MUST be in the form of a URL. */
|
|
69
|
-
url: z.ZodOptional<z.ZodString
|
|
94
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
70
95
|
/** The email address of the contact person/organization. This MUST be in the form of an email address. */
|
|
71
|
-
email: z.ZodOptional<z.ZodString
|
|
96
|
+
email: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
72
97
|
}, "strip", z.ZodTypeAny, {
|
|
73
98
|
name?: string | undefined;
|
|
74
99
|
url?: string | undefined;
|
|
75
100
|
email?: string | undefined;
|
|
76
101
|
}, {
|
|
102
|
+
name?: string | undefined;
|
|
103
|
+
url?: unknown;
|
|
104
|
+
email?: unknown;
|
|
105
|
+
}>, {
|
|
77
106
|
name?: string | undefined;
|
|
78
107
|
url?: string | undefined;
|
|
79
108
|
email?: string | undefined;
|
|
80
|
-
}
|
|
109
|
+
}, {
|
|
110
|
+
name?: string | undefined;
|
|
111
|
+
url?: unknown;
|
|
112
|
+
email?: unknown;
|
|
113
|
+
}>>>;
|
|
81
114
|
/** The license information for the exposed API. */
|
|
82
|
-
license: z.ZodOptional<z.ZodObject<{
|
|
115
|
+
license: z.ZodCatch<z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
83
116
|
/** REQUIRED. The license name used for the API. */
|
|
84
|
-
name: z.
|
|
117
|
+
name: z.ZodCatch<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
85
118
|
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
86
|
-
identifier: z.ZodOptional<z.ZodString
|
|
119
|
+
identifier: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
87
120
|
/**
|
|
88
|
-
* A
|
|
89
|
-
* is mutually exclusive of the identifier field.
|
|
121
|
+
* A URI for the license used for the API. This MUST be in the form of a URI. The url field is mutually exclusive of the identifier field.
|
|
90
122
|
*/
|
|
91
|
-
url: z.ZodOptional<z.ZodString
|
|
123
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
92
124
|
}, "strip", z.ZodTypeAny, {
|
|
93
|
-
name
|
|
125
|
+
name?: string | null | undefined;
|
|
94
126
|
identifier?: string | undefined;
|
|
95
127
|
url?: string | undefined;
|
|
96
128
|
}, {
|
|
97
|
-
name?:
|
|
129
|
+
name?: unknown;
|
|
130
|
+
identifier?: unknown;
|
|
131
|
+
url?: unknown;
|
|
132
|
+
}>, {
|
|
133
|
+
name?: string | null | undefined;
|
|
98
134
|
identifier?: string | undefined;
|
|
99
135
|
url?: string | undefined;
|
|
100
|
-
}
|
|
136
|
+
}, {
|
|
137
|
+
name?: unknown;
|
|
138
|
+
identifier?: unknown;
|
|
139
|
+
url?: unknown;
|
|
140
|
+
}>>>;
|
|
101
141
|
/**
|
|
102
|
-
* REQUIRED. The version of the OpenAPI
|
|
103
|
-
*
|
|
142
|
+
* REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the
|
|
143
|
+
* version of the API being described or the version of the OpenAPI Description).
|
|
104
144
|
*/
|
|
105
|
-
version: z.
|
|
145
|
+
version: z.ZodCatch<z.ZodString>;
|
|
106
146
|
}, "strip", z.ZodTypeAny, {
|
|
107
147
|
title: string;
|
|
108
148
|
version: string;
|
|
@@ -115,13 +155,22 @@ export declare const oasInfoSchema: z.ZodObject<{
|
|
|
115
155
|
email?: string | undefined;
|
|
116
156
|
} | undefined;
|
|
117
157
|
license?: {
|
|
118
|
-
name
|
|
158
|
+
name?: string | null | undefined;
|
|
119
159
|
identifier?: string | undefined;
|
|
120
160
|
url?: string | undefined;
|
|
121
161
|
} | undefined;
|
|
122
162
|
}, {
|
|
163
|
+
description?: unknown;
|
|
164
|
+
title?: unknown;
|
|
165
|
+
summary?: unknown;
|
|
166
|
+
termsOfService?: unknown;
|
|
167
|
+
contact?: unknown;
|
|
168
|
+
license?: unknown;
|
|
169
|
+
version?: unknown;
|
|
170
|
+
}>, {
|
|
171
|
+
title: string;
|
|
172
|
+
version: string;
|
|
123
173
|
description?: string | undefined;
|
|
124
|
-
title?: string | undefined;
|
|
125
174
|
summary?: string | undefined;
|
|
126
175
|
termsOfService?: string | undefined;
|
|
127
176
|
contact?: {
|
|
@@ -130,29 +179,43 @@ export declare const oasInfoSchema: z.ZodObject<{
|
|
|
130
179
|
email?: string | undefined;
|
|
131
180
|
} | undefined;
|
|
132
181
|
license?: {
|
|
133
|
-
name?: string | undefined;
|
|
182
|
+
name?: string | null | undefined;
|
|
134
183
|
identifier?: string | undefined;
|
|
135
184
|
url?: string | undefined;
|
|
136
185
|
} | undefined;
|
|
137
|
-
|
|
186
|
+
}, {
|
|
187
|
+
description?: unknown;
|
|
188
|
+
title?: unknown;
|
|
189
|
+
summary?: unknown;
|
|
190
|
+
termsOfService?: unknown;
|
|
191
|
+
contact?: unknown;
|
|
192
|
+
license?: unknown;
|
|
193
|
+
version?: unknown;
|
|
138
194
|
}>;
|
|
139
195
|
/**
|
|
140
|
-
* External Documentation
|
|
196
|
+
* External Documentation Object
|
|
197
|
+
*
|
|
141
198
|
* Allows referencing an external resource for extended documentation.
|
|
142
199
|
*
|
|
143
|
-
* @see https://
|
|
200
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#external-documentation-object
|
|
144
201
|
*/
|
|
145
|
-
export declare const oasExternalDocumentationSchema: z.ZodObject<{
|
|
202
|
+
export declare const oasExternalDocumentationSchema: z.ZodEffects<z.ZodObject<{
|
|
146
203
|
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
147
|
-
description: z.ZodOptional<z.ZodString
|
|
204
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
148
205
|
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
149
|
-
url: z.
|
|
206
|
+
url: z.ZodString;
|
|
150
207
|
}, "strip", z.ZodTypeAny, {
|
|
151
208
|
url: string;
|
|
152
209
|
description?: string | undefined;
|
|
153
210
|
}, {
|
|
211
|
+
url: string;
|
|
212
|
+
description?: unknown;
|
|
213
|
+
}>, {
|
|
214
|
+
url: string;
|
|
154
215
|
description?: string | undefined;
|
|
155
|
-
|
|
216
|
+
}, {
|
|
217
|
+
url: string;
|
|
218
|
+
description?: unknown;
|
|
156
219
|
}>;
|
|
157
220
|
export type ExternalDocumentation = z.infer<typeof oasExternalDocumentationSchema>;
|
|
158
221
|
export declare const xScalarNestedSchema: z.ZodArray<z.ZodObject<{
|
|
@@ -163,35 +226,40 @@ export declare const xScalarNestedSchema: z.ZodArray<z.ZodObject<{
|
|
|
163
226
|
tagName: string;
|
|
164
227
|
}>, "many">;
|
|
165
228
|
/**
|
|
166
|
-
* Tag
|
|
167
|
-
*
|
|
168
|
-
*
|
|
229
|
+
* Tag Object
|
|
230
|
+
*
|
|
231
|
+
* Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag
|
|
232
|
+
* defined in the Operation Object instances.
|
|
169
233
|
*
|
|
170
|
-
* @see https://
|
|
234
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#tag-object
|
|
171
235
|
*/
|
|
172
236
|
export declare const oasTagSchema: z.ZodObject<{
|
|
173
237
|
/**
|
|
174
|
-
* @deprecated
|
|
175
|
-
*
|
|
176
|
-
* Needs to be remove as it is not a spec property
|
|
238
|
+
* @deprecated Needs to be remove as it is not a spec property
|
|
177
239
|
*/
|
|
178
240
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"tag">>>;
|
|
179
241
|
/** REQUIRED. The name of the tag. */
|
|
180
242
|
name: z.ZodString;
|
|
181
243
|
/** A description for the tag. CommonMark syntax MAY be used for rich text representation. */
|
|
182
|
-
description: z.ZodOptional<z.ZodString
|
|
244
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
183
245
|
/** Additional external documentation for this tag. */
|
|
184
|
-
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
246
|
+
externalDocs: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
185
247
|
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
186
|
-
description: z.ZodOptional<z.ZodString
|
|
248
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
187
249
|
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
188
|
-
url: z.
|
|
250
|
+
url: z.ZodString;
|
|
189
251
|
}, "strip", z.ZodTypeAny, {
|
|
190
252
|
url: string;
|
|
191
253
|
description?: string | undefined;
|
|
192
254
|
}, {
|
|
255
|
+
url: string;
|
|
256
|
+
description?: unknown;
|
|
257
|
+
}>, {
|
|
258
|
+
url: string;
|
|
193
259
|
description?: string | undefined;
|
|
194
|
-
|
|
260
|
+
}, {
|
|
261
|
+
url: string;
|
|
262
|
+
description?: unknown;
|
|
195
263
|
}>>;
|
|
196
264
|
'x-scalar-children': z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
197
265
|
tagName: z.ZodString;
|
|
@@ -219,10 +287,10 @@ export declare const oasTagSchema: z.ZodObject<{
|
|
|
219
287
|
}, {
|
|
220
288
|
name: string;
|
|
221
289
|
type?: "tag" | undefined;
|
|
222
|
-
description?:
|
|
290
|
+
description?: unknown;
|
|
223
291
|
externalDocs?: {
|
|
224
|
-
|
|
225
|
-
|
|
292
|
+
url: string;
|
|
293
|
+
description?: unknown;
|
|
226
294
|
} | undefined;
|
|
227
295
|
'x-scalar-children'?: {
|
|
228
296
|
tagName: string;
|
|
@@ -232,27 +300,31 @@ export declare const oasTagSchema: z.ZodObject<{
|
|
|
232
300
|
}>;
|
|
233
301
|
export declare const tagSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
234
302
|
/**
|
|
235
|
-
* @deprecated
|
|
236
|
-
*
|
|
237
|
-
* Needs to be remove as it is not a spec property
|
|
303
|
+
* @deprecated Needs to be remove as it is not a spec property
|
|
238
304
|
*/
|
|
239
305
|
type: z.ZodDefault<z.ZodOptional<z.ZodLiteral<"tag">>>;
|
|
240
306
|
/** REQUIRED. The name of the tag. */
|
|
241
307
|
name: z.ZodString;
|
|
242
308
|
/** A description for the tag. CommonMark syntax MAY be used for rich text representation. */
|
|
243
|
-
description: z.ZodOptional<z.ZodString
|
|
309
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
244
310
|
/** Additional external documentation for this tag. */
|
|
245
|
-
externalDocs: z.ZodOptional<z.ZodObject<{
|
|
311
|
+
externalDocs: z.ZodOptional<z.ZodEffects<z.ZodObject<{
|
|
246
312
|
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
247
|
-
description: z.ZodOptional<z.ZodString
|
|
313
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
248
314
|
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
249
|
-
url: z.
|
|
315
|
+
url: z.ZodString;
|
|
250
316
|
}, "strip", z.ZodTypeAny, {
|
|
251
317
|
url: string;
|
|
252
318
|
description?: string | undefined;
|
|
253
319
|
}, {
|
|
320
|
+
url: string;
|
|
321
|
+
description?: unknown;
|
|
322
|
+
}>, {
|
|
323
|
+
url: string;
|
|
254
324
|
description?: string | undefined;
|
|
255
|
-
|
|
325
|
+
}, {
|
|
326
|
+
url: string;
|
|
327
|
+
description?: unknown;
|
|
256
328
|
}>>;
|
|
257
329
|
'x-scalar-children': z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
258
330
|
tagName: z.ZodString;
|
|
@@ -286,10 +358,10 @@ export declare const tagSchema: z.ZodObject<z.objectUtil.extendShape<{
|
|
|
286
358
|
name: string;
|
|
287
359
|
type?: "tag" | undefined;
|
|
288
360
|
uid?: string | undefined;
|
|
289
|
-
description?:
|
|
361
|
+
description?: unknown;
|
|
290
362
|
externalDocs?: {
|
|
291
|
-
|
|
292
|
-
|
|
363
|
+
url: string;
|
|
364
|
+
description?: unknown;
|
|
293
365
|
} | undefined;
|
|
294
366
|
'x-scalar-children'?: {
|
|
295
367
|
tagName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-objects.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/spec-objects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;
|
|
1
|
+
{"version":3,"file":"spec-objects.d.ts","sourceRoot":"","sources":["../../../src/entities/spec/spec-objects.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,QAAQ,CAAC,KAAG,CAE/D,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;IAEzB,mDAAmD;;IAEnD,2GAA2G;;IAE3G;;OAEG;;;;;;;;;;;;;;;;;;EAG0B,CAAA;AAEjC;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB;IAEzB,+DAA+D;;IAE/D,sFAAsF;;IAEtF,0GAA0G;;;;;;;;;;;;;;;;;;EAG7E,CAAA;AAEjC;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;IAEtB,sCAAsC;;IAEtC,kCAAkC;;IAElC,4FAA4F;;IAE5F,oFAAoF;;IAEpF,mDAAmD;;QA3BnD,+DAA+D;;QAE/D,sFAAsF;;QAEtF,0GAA0G;;;;;;;;;;;;;;;;;;;IAyB1G,mDAAmD;;QAjDnD,mDAAmD;;QAEnD,2GAA2G;;QAE3G;;WAEG;;;;;;;;;;;;;;;;;;;IA6CH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAG0B,CAAA;AAEjC;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B;IAEvC,6GAA6G;;IAE7G,yFAAyF;;;;;;;;;;;;;;EAG5D,CAAA;AAEjC,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAA;AAElF,eAAO,MAAM,mBAAmB;;;;;;WAItB,CAAA;AAEV;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY;IAEvB;;OAEG;;IAEH,qCAAqC;;IAErC,6FAA6F;;IAE7F,sDAAsD;;QAjCpD,6GAA6G;;QAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;IAkC3F,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGvB,CAAA;AAEF,eAAO,MAAM,SAAS;IAhBpB;;OAEG;;IAEH,qCAAqC;;IAErC,6FAA6F;;IAE7F,sDAAsD;;QAjCpD,6GAA6G;;QAE7G,yFAAyF;;;;;;;;;;;;;;;;;;;;;;IAkC3F,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWvB,CAAA;AAEF,MAAM,MAAM,GAAG,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA;AAC3C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAA"}
|
|
@@ -2,96 +2,116 @@ import { nanoidSchema } from '../shared/utility.js';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
+
* Removes undefined values from an object.
|
|
6
|
+
*
|
|
7
|
+
* Can be used as a transform function for any Zod schema.
|
|
8
|
+
*/
|
|
9
|
+
const omitUndefinedValues = (data) => {
|
|
10
|
+
return Object.fromEntries(Object.entries(data).filter(([_, value]) => value !== undefined));
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* License Object
|
|
14
|
+
*
|
|
5
15
|
* License information for the exposed API.
|
|
6
16
|
*
|
|
7
|
-
* @see https://
|
|
17
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#license-object
|
|
8
18
|
*/
|
|
9
|
-
const oasLicenseSchema = z
|
|
19
|
+
const oasLicenseSchema = z
|
|
20
|
+
.object({
|
|
10
21
|
/** REQUIRED. The license name used for the API. */
|
|
11
|
-
name: z.string().optional().
|
|
22
|
+
name: z.string().optional().nullable().catch(null),
|
|
12
23
|
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
13
|
-
identifier: z.string().optional(),
|
|
24
|
+
identifier: z.string().optional().catch(undefined),
|
|
14
25
|
/**
|
|
15
|
-
* A
|
|
16
|
-
* is mutually exclusive of the identifier field.
|
|
26
|
+
* A URI for the license used for the API. This MUST be in the form of a URI. The url field is mutually exclusive of the identifier field.
|
|
17
27
|
*/
|
|
18
|
-
url: z.string().optional(),
|
|
19
|
-
})
|
|
28
|
+
url: z.string().url().optional().catch(undefined),
|
|
29
|
+
})
|
|
30
|
+
.transform(omitUndefinedValues);
|
|
20
31
|
/**
|
|
21
|
-
* Contact
|
|
32
|
+
* Contact Object
|
|
33
|
+
*
|
|
22
34
|
* Contact information for the exposed API.
|
|
23
35
|
*
|
|
24
|
-
* @see https://
|
|
36
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#contact-object
|
|
25
37
|
*/
|
|
26
|
-
const oasContactSchema = z
|
|
38
|
+
const oasContactSchema = z
|
|
39
|
+
.object({
|
|
27
40
|
/** The identifying name of the contact person/organization. */
|
|
28
41
|
name: z.string().optional(),
|
|
29
42
|
/** The URL pointing to the contact information. This MUST be in the form of a URL. */
|
|
30
|
-
url: z.string().optional(),
|
|
43
|
+
url: z.string().url().optional().catch(undefined),
|
|
31
44
|
/** The email address of the contact person/organization. This MUST be in the form of an email address. */
|
|
32
|
-
email: z.string().
|
|
33
|
-
})
|
|
45
|
+
email: z.string().optional().catch(undefined),
|
|
46
|
+
})
|
|
47
|
+
.transform(omitUndefinedValues);
|
|
34
48
|
/**
|
|
35
|
-
* Info
|
|
49
|
+
* Info Object
|
|
50
|
+
*
|
|
36
51
|
* The object provides metadata about the API. The metadata MAY be used by the clients if needed,
|
|
37
52
|
* and MAY be presented in editing or documentation generation tools for convenience.
|
|
38
53
|
*
|
|
39
|
-
* @see https://
|
|
54
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#info-object
|
|
40
55
|
*/
|
|
41
|
-
const oasInfoSchema = z
|
|
56
|
+
const oasInfoSchema = z
|
|
57
|
+
.object({
|
|
42
58
|
/** REQUIRED. The title of the API. */
|
|
43
|
-
title: z.string().
|
|
59
|
+
title: z.string().catch('API'),
|
|
44
60
|
/** A short summary of the API. */
|
|
45
|
-
summary: z.string().optional(),
|
|
61
|
+
summary: z.string().optional().catch(undefined),
|
|
46
62
|
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
47
|
-
description: z.string().optional(),
|
|
63
|
+
description: z.string().optional().catch(undefined),
|
|
48
64
|
/** A URL to the Terms of Service for the API. This MUST be in the form of a URL. */
|
|
49
|
-
termsOfService: z.string().optional(),
|
|
65
|
+
termsOfService: z.string().url().optional().catch(undefined),
|
|
50
66
|
/** The contact information for the exposed API. */
|
|
51
|
-
contact: oasContactSchema.optional(),
|
|
67
|
+
contact: oasContactSchema.optional().catch(undefined),
|
|
52
68
|
/** The license information for the exposed API. */
|
|
53
|
-
license: oasLicenseSchema.optional(),
|
|
69
|
+
license: oasLicenseSchema.optional().catch(undefined),
|
|
54
70
|
/**
|
|
55
|
-
* REQUIRED. The version of the OpenAPI
|
|
56
|
-
*
|
|
71
|
+
* REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the
|
|
72
|
+
* version of the API being described or the version of the OpenAPI Description).
|
|
57
73
|
*/
|
|
58
|
-
version: z.string().
|
|
59
|
-
})
|
|
74
|
+
version: z.string().catch('1.0'),
|
|
75
|
+
})
|
|
76
|
+
.transform(omitUndefinedValues);
|
|
60
77
|
/**
|
|
61
|
-
* External Documentation
|
|
78
|
+
* External Documentation Object
|
|
79
|
+
*
|
|
62
80
|
* Allows referencing an external resource for extended documentation.
|
|
63
81
|
*
|
|
64
|
-
* @see https://
|
|
82
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#external-documentation-object
|
|
65
83
|
*/
|
|
66
|
-
const oasExternalDocumentationSchema = z
|
|
84
|
+
const oasExternalDocumentationSchema = z
|
|
85
|
+
.object({
|
|
67
86
|
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
68
|
-
description: z.string().optional(),
|
|
87
|
+
description: z.string().optional().catch(undefined),
|
|
69
88
|
/** REQUIRED. The URL for the target documentation. This MUST be in the form of a URL. */
|
|
70
|
-
url: z.string()
|
|
71
|
-
})
|
|
89
|
+
url: z.string(),
|
|
90
|
+
})
|
|
91
|
+
.transform(omitUndefinedValues);
|
|
72
92
|
const xScalarNestedSchema = z
|
|
73
93
|
.object({
|
|
74
94
|
tagName: z.string(),
|
|
75
95
|
})
|
|
76
96
|
.array();
|
|
77
97
|
/**
|
|
78
|
-
* Tag
|
|
79
|
-
*
|
|
80
|
-
*
|
|
98
|
+
* Tag Object
|
|
99
|
+
*
|
|
100
|
+
* Adds metadata to a single tag that is used by the Operation Object. It is not mandatory to have a Tag Object per tag
|
|
101
|
+
* defined in the Operation Object instances.
|
|
81
102
|
*
|
|
82
|
-
* @see https://
|
|
103
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#tag-object
|
|
83
104
|
*/
|
|
84
105
|
const oasTagSchema = z.object({
|
|
106
|
+
// TODO: Remove
|
|
85
107
|
/**
|
|
86
|
-
* @deprecated
|
|
87
|
-
*
|
|
88
|
-
* Needs to be remove as it is not a spec property
|
|
108
|
+
* @deprecated Needs to be remove as it is not a spec property
|
|
89
109
|
*/
|
|
90
110
|
'type': z.literal('tag').optional().default('tag'),
|
|
91
111
|
/** REQUIRED. The name of the tag. */
|
|
92
112
|
'name': z.string(),
|
|
93
113
|
/** A description for the tag. CommonMark syntax MAY be used for rich text representation. */
|
|
94
|
-
'description': z.string().optional(),
|
|
114
|
+
'description': z.string().optional().catch(undefined),
|
|
95
115
|
/** Additional external documentation for this tag. */
|
|
96
116
|
'externalDocs': oasExternalDocumentationSchema.optional(),
|
|
97
117
|
'x-scalar-children': xScalarNestedSchema.default([]).optional(),
|
|
@@ -107,4 +127,4 @@ const tagSchema = oasTagSchema.extend({
|
|
|
107
127
|
.default([]),
|
|
108
128
|
});
|
|
109
129
|
|
|
110
|
-
export { oasContactSchema, oasExternalDocumentationSchema, oasInfoSchema, oasLicenseSchema, oasTagSchema, tagSchema, xScalarNestedSchema };
|
|
130
|
+
export { oasContactSchema, oasExternalDocumentationSchema, oasInfoSchema, oasLicenseSchema, oasTagSchema, omitUndefinedValues, tagSchema, xScalarNestedSchema };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchWithProxyFallback.d.ts","sourceRoot":"","sources":["../../src/helpers/fetchWithProxyFallback.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,
|
|
1
|
+
{"version":3,"file":"fetchWithProxyFallback.d.ts","sourceRoot":"","sources":["../../src/helpers/fetchWithProxyFallback.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,6BAA6B,GAAG;IAC1C,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;CAC7B,CAAA;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,6BAA6B,qBAuBxG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findVariables.d.ts","sourceRoot":"","sources":["../../src/helpers/findVariables.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,
|
|
1
|
+
{"version":3,"file":"findVariables.d.ts","sourceRoot":"","sources":["../../src/helpers/findVariables.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,aAAa,UAAW,MAAM,aAE1C,CAAA"}
|