@scalar/openapi-types 0.1.9 → 0.2.1
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 +16 -0
- package/README.md +76 -0
- package/dist/schemas/3.1/processed/base-path-item-object.d.ts +603 -0
- package/dist/schemas/3.1/processed/base-path-item-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/base-path-item-object.js +35 -0
- package/dist/schemas/3.1/processed/callback-object.d.ts +169 -0
- package/dist/schemas/3.1/processed/callback-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/callback-object.js +17 -0
- package/dist/schemas/3.1/processed/components-object.d.ts +14411 -0
- package/dist/schemas/3.1/processed/components-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/components-object.js +64 -0
- package/dist/schemas/3.1/processed/contact-object.d.ts +25 -0
- package/dist/schemas/3.1/processed/contact-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/contact-object.js +19 -0
- package/dist/schemas/3.1/processed/discriminator-object.d.ts +32 -0
- package/dist/schemas/3.1/processed/discriminator-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/discriminator-object.js +28 -0
- package/dist/schemas/3.1/processed/encoding-object.d.ts +191 -0
- package/dist/schemas/3.1/processed/encoding-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/encoding-object.js +30 -0
- package/dist/schemas/3.1/processed/example-object.d.ts +43 -0
- package/dist/schemas/3.1/processed/example-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/example-object.js +35 -0
- package/dist/schemas/3.1/processed/external-documentation-object.d.ts +21 -0
- package/dist/schemas/3.1/processed/external-documentation-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/external-documentation-object.js +17 -0
- package/dist/schemas/3.1/processed/header-object.d.ts +161 -0
- package/dist/schemas/3.1/processed/header-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/header-object.js +66 -0
- package/dist/schemas/3.1/processed/index.d.ts +31 -0
- package/dist/schemas/3.1/processed/index.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/index.js +30 -0
- package/dist/schemas/3.1/processed/info-object.d.ts +89 -0
- package/dist/schemas/3.1/processed/info-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/info-object.js +45 -0
- package/dist/schemas/3.1/processed/license-object.d.ts +27 -0
- package/dist/schemas/3.1/processed/license-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/license-object.js +21 -0
- package/dist/schemas/3.1/processed/link-object.d.ts +110 -0
- package/dist/schemas/3.1/processed/link-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/link-object.js +52 -0
- package/dist/schemas/3.1/processed/media-type-object-without-encoding.d.ts +60 -0
- package/dist/schemas/3.1/processed/media-type-object-without-encoding.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/media-type-object-without-encoding.js +34 -0
- package/dist/schemas/3.1/processed/media-type-object.d.ts +289 -0
- package/dist/schemas/3.1/processed/media-type-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/media-type-object.js +38 -0
- package/dist/schemas/3.1/processed/openapi-object.d.ts +31 -0
- package/dist/schemas/3.1/processed/openapi-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/openapi-object.js +78 -0
- package/dist/schemas/3.1/processed/operation-object-without-callbacks.d.ts +2094 -0
- package/dist/schemas/3.1/processed/operation-object-without-callbacks.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/operation-object-without-callbacks.js +72 -0
- package/dist/schemas/3.1/processed/operation-object.d.ts +16 -0
- package/dist/schemas/3.1/processed/operation-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/operation-object.js +22 -0
- package/dist/schemas/3.1/processed/parameter-object.d.ts +476 -0
- package/dist/schemas/3.1/processed/parameter-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/parameter-object.js +93 -0
- package/dist/schemas/3.1/processed/path-item-object-without-callbacks.d.ts +25 -0
- package/dist/schemas/3.1/processed/path-item-object-without-callbacks.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/path-item-object-without-callbacks.js +48 -0
- package/dist/schemas/3.1/processed/path-item-object.d.ts +7741 -0
- package/dist/schemas/3.1/processed/path-item-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/path-item-object.js +48 -0
- package/dist/schemas/3.1/processed/paths-object.d.ts +7718 -0
- package/dist/schemas/3.1/processed/paths-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/paths-object.js +23 -0
- package/dist/schemas/3.1/processed/request-body-object.d.ts +595 -0
- package/dist/schemas/3.1/processed/request-body-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/request-body-object.js +33 -0
- package/dist/schemas/3.1/processed/response-object.d.ts +633 -0
- package/dist/schemas/3.1/processed/response-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/response-object.js +36 -0
- package/dist/schemas/3.1/processed/responses-object.d.ts +626 -0
- package/dist/schemas/3.1/processed/responses-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/responses-object.js +31 -0
- package/dist/schemas/3.1/processed/runtime-expression.d.ts +15 -0
- package/dist/schemas/3.1/processed/runtime-expression.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/runtime-expression.js +98 -0
- package/dist/schemas/3.1/processed/schema-object.d.ts +8 -0
- package/dist/schemas/3.1/processed/schema-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/schema-object.js +91 -0
- package/dist/schemas/3.1/processed/security-requirement-object.d.ts +21 -0
- package/dist/schemas/3.1/processed/security-requirement-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/security-requirement-object.js +37 -0
- package/dist/schemas/3.1/processed/security-scheme-object.d.ts +823 -0
- package/dist/schemas/3.1/processed/security-scheme-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/security-scheme-object.js +170 -0
- package/dist/schemas/3.1/processed/server-object.d.ts +52 -0
- package/dist/schemas/3.1/processed/server-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/server-object.js +27 -0
- package/dist/schemas/3.1/processed/server-variable-object.d.ts +33 -0
- package/dist/schemas/3.1/processed/server-variable-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/server-variable-object.js +27 -0
- package/dist/schemas/3.1/processed/tag-object.d.ts +41 -0
- package/dist/schemas/3.1/processed/tag-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/tag-object.js +21 -0
- package/dist/schemas/3.1/processed/webhooks-object.d.ts +172 -0
- package/dist/schemas/3.1/processed/webhooks-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/webhooks-object.js +19 -0
- package/dist/schemas/3.1/processed/xml-object.d.ts +51 -0
- package/dist/schemas/3.1/processed/xml-object.d.ts.map +1 -0
- package/dist/schemas/3.1/processed/xml-object.js +40 -0
- package/dist/schemas/3.1/unprocessed/base-path-item-object.d.ts +1811 -0
- package/dist/schemas/3.1/unprocessed/base-path-item-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/base-path-item-object.js +23 -0
- package/dist/schemas/3.1/unprocessed/callback-object.d.ts +168 -0
- package/dist/schemas/3.1/unprocessed/callback-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/callback-object.js +15 -0
- package/dist/schemas/3.1/unprocessed/components-object.d.ts +28835 -0
- package/dist/schemas/3.1/unprocessed/components-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/components-object.js +66 -0
- package/dist/schemas/3.1/unprocessed/contact-object.d.ts +21 -0
- package/dist/schemas/3.1/unprocessed/contact-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/contact-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/discriminator-object.d.ts +23 -0
- package/dist/schemas/3.1/unprocessed/discriminator-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/discriminator-object.js +17 -0
- package/dist/schemas/3.1/unprocessed/encoding-object.d.ts +402 -0
- package/dist/schemas/3.1/unprocessed/encoding-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/encoding-object.js +26 -0
- package/dist/schemas/3.1/unprocessed/example-object.d.ts +28 -0
- package/dist/schemas/3.1/unprocessed/example-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/example-object.js +16 -0
- package/dist/schemas/3.1/unprocessed/external-documentation-object.d.ts +18 -0
- package/dist/schemas/3.1/unprocessed/external-documentation-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/external-documentation-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/header-object.d.ts +217 -0
- package/dist/schemas/3.1/unprocessed/header-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/header-object.js +42 -0
- package/dist/schemas/3.1/unprocessed/index.d.ts +32 -0
- package/dist/schemas/3.1/unprocessed/index.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/index.js +31 -0
- package/dist/schemas/3.1/unprocessed/info-object.d.ts +66 -0
- package/dist/schemas/3.1/unprocessed/info-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/info-object.js +13 -0
- package/dist/schemas/3.1/unprocessed/license-object.d.ts +21 -0
- package/dist/schemas/3.1/unprocessed/license-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/license-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/link-object.d.ts +86 -0
- package/dist/schemas/3.1/unprocessed/link-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/link-object.js +20 -0
- package/dist/schemas/3.1/unprocessed/media-type-object-without-encoding.d.ts +46 -0
- package/dist/schemas/3.1/unprocessed/media-type-object-without-encoding.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/media-type-object-without-encoding.js +12 -0
- package/dist/schemas/3.1/unprocessed/media-type-object.d.ts +728 -0
- package/dist/schemas/3.1/unprocessed/media-type-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/media-type-object.js +40 -0
- package/dist/schemas/3.1/unprocessed/openapi-object.d.ts +31 -0
- package/dist/schemas/3.1/unprocessed/openapi-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/openapi-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/operation-object-without-callbacks.d.ts +3893 -0
- package/dist/schemas/3.1/unprocessed/operation-object-without-callbacks.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/operation-object-without-callbacks.js +45 -0
- package/dist/schemas/3.1/unprocessed/operation-object.d.ts +17 -0
- package/dist/schemas/3.1/unprocessed/operation-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/operation-object.js +23 -0
- package/dist/schemas/3.1/unprocessed/parameter-object.d.ts +1186 -0
- package/dist/schemas/3.1/unprocessed/parameter-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/parameter-object.js +31 -0
- package/dist/schemas/3.1/unprocessed/path-item-object-without-callbacks.d.ts +25 -0
- package/dist/schemas/3.1/unprocessed/path-item-object-without-callbacks.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/path-item-object-without-callbacks.js +48 -0
- package/dist/schemas/3.1/unprocessed/path-item-object.d.ts +9743 -0
- package/dist/schemas/3.1/unprocessed/path-item-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/path-item-object.js +62 -0
- package/dist/schemas/3.1/unprocessed/paths-object.d.ts +7717 -0
- package/dist/schemas/3.1/unprocessed/paths-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/paths-object.js +14 -0
- package/dist/schemas/3.1/unprocessed/reference-object.d.ts +36 -0
- package/dist/schemas/3.1/unprocessed/reference-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/reference-object.js +30 -0
- package/dist/schemas/3.1/unprocessed/request-body-object.d.ts +580 -0
- package/dist/schemas/3.1/unprocessed/request-body-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/request-body-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/response-object.d.ts +1661 -0
- package/dist/schemas/3.1/unprocessed/response-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/response-object.js +34 -0
- package/dist/schemas/3.1/unprocessed/responses-object.d.ts +1669 -0
- package/dist/schemas/3.1/unprocessed/responses-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/responses-object.js +32 -0
- package/dist/schemas/3.1/unprocessed/runtime-expression.d.ts +14 -0
- package/dist/schemas/3.1/unprocessed/runtime-expression.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/runtime-expression.js +17 -0
- package/dist/schemas/3.1/unprocessed/schema-object.d.ts +8 -0
- package/dist/schemas/3.1/unprocessed/schema-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/schema-object.js +32 -0
- package/dist/schemas/3.1/unprocessed/security-requirement-object.d.ts +20 -0
- package/dist/schemas/3.1/unprocessed/security-requirement-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/security-requirement-object.js +23 -0
- package/dist/schemas/3.1/unprocessed/security-scheme-object.d.ts +590 -0
- package/dist/schemas/3.1/unprocessed/security-scheme-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/security-scheme-object.js +29 -0
- package/dist/schemas/3.1/unprocessed/server-object.d.ts +41 -0
- package/dist/schemas/3.1/unprocessed/server-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/server-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/server-variable-object.d.ts +21 -0
- package/dist/schemas/3.1/unprocessed/server-variable-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/server-variable-object.js +12 -0
- package/dist/schemas/3.1/unprocessed/tag-object.d.ts +37 -0
- package/dist/schemas/3.1/unprocessed/tag-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/tag-object.js +13 -0
- package/dist/schemas/3.1/unprocessed/webhooks-object.d.ts +212 -0
- package/dist/schemas/3.1/unprocessed/webhooks-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/webhooks-object.js +19 -0
- package/dist/schemas/3.1/unprocessed/xml-object.d.ts +31 -0
- package/dist/schemas/3.1/unprocessed/xml-object.d.ts.map +1 -0
- package/dist/schemas/3.1/unprocessed/xml-object.js +16 -0
- package/dist/schemas/extensions/index.d.ts +12 -0
- package/dist/schemas/extensions/index.d.ts.map +1 -0
- package/dist/schemas/extensions/index.js +11 -0
- package/dist/schemas/extensions/x-additional-properties-name.d.ts +16 -0
- package/dist/schemas/extensions/x-additional-properties-name.d.ts.map +1 -0
- package/dist/schemas/extensions/x-additional-properties-name.js +14 -0
- package/dist/schemas/extensions/x-code-samples.d.ts +76 -0
- package/dist/schemas/extensions/x-code-samples.d.ts.map +1 -0
- package/dist/schemas/extensions/x-code-samples.js +14 -0
- package/dist/schemas/extensions/x-display-name.d.ts +17 -0
- package/dist/schemas/extensions/x-display-name.d.ts.map +1 -0
- package/dist/schemas/extensions/x-enum-descriptions.d.ts +22 -0
- package/dist/schemas/extensions/x-enum-descriptions.d.ts.map +1 -0
- package/dist/schemas/extensions/x-enum-descriptions.js +20 -0
- package/dist/schemas/extensions/x-internal.d.ts +9 -0
- package/dist/schemas/extensions/x-internal.d.ts.map +1 -0
- package/dist/schemas/extensions/x-internal.js +7 -0
- package/dist/schemas/extensions/x-scalar-icon.d.ts +9 -0
- package/dist/schemas/extensions/x-scalar-icon.d.ts.map +1 -0
- package/dist/schemas/extensions/x-scalar-icon.js +7 -0
- package/dist/schemas/extensions/x-scalar-ignore.d.ts +9 -0
- package/dist/schemas/extensions/x-scalar-ignore.d.ts.map +1 -0
- package/dist/schemas/extensions/x-scalar-ignore.js +7 -0
- package/dist/schemas/extensions/x-scalar-redirect-uri.d.ts +9 -0
- package/dist/schemas/extensions/x-scalar-redirect-uri.d.ts.map +1 -0
- package/dist/schemas/extensions/x-scalar-redirect-uri.js +7 -0
- package/dist/schemas/extensions/x-scalar-sdk-installation.d.ts +25 -0
- package/dist/schemas/extensions/x-scalar-sdk-installation.d.ts.map +1 -0
- package/dist/schemas/extensions/x-scalar-sdk-installation.js +15 -0
- package/dist/schemas/extensions/x-scalar-stability.d.ts +23 -0
- package/dist/schemas/extensions/x-scalar-stability.d.ts.map +1 -0
- package/dist/schemas/extensions/x-scalar-stability.js +23 -0
- package/dist/schemas/extensions/x-tag-groups.d.ts +39 -0
- package/dist/schemas/extensions/x-tag-groups.d.ts.map +1 -0
- package/dist/schemas/extensions/x-tag-groups.js +20 -0
- package/dist/schemas/extensions/x-use-pkce.d.ts +14 -0
- package/dist/schemas/extensions/x-use-pkce.d.ts.map +1 -0
- package/dist/schemas/extensions/x-use-pkce.js +12 -0
- package/package.json +20 -2
- package/LICENSE +0 -21
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Header Object
|
|
4
|
+
*
|
|
5
|
+
* Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant
|
|
6
|
+
* Response Object and Encoding Object documentation for restrictions on which headers can be described.
|
|
7
|
+
*
|
|
8
|
+
* The Header Object follows the structure of the Parameter Object, including determining its serialization strategy
|
|
9
|
+
* based on whether schema or content is present, with the following changes:
|
|
10
|
+
*
|
|
11
|
+
* - name MUST NOT be specified, it is given in the corresponding headers map.
|
|
12
|
+
* - in MUST NOT be specified, it is implicitly in header.
|
|
13
|
+
* - All traits that are affected by the location MUST be applicable to a location of header (for example, style).
|
|
14
|
+
* This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to
|
|
15
|
+
* "simple".
|
|
16
|
+
*
|
|
17
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#header-object
|
|
18
|
+
*/
|
|
19
|
+
export declare const HeaderObjectSchema: z.ZodObject<{
|
|
20
|
+
/**
|
|
21
|
+
* A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text
|
|
22
|
+
* representation.
|
|
23
|
+
*/
|
|
24
|
+
description: z.ZodOptional<z.ZodString>;
|
|
25
|
+
/**
|
|
26
|
+
* Determines whether this header is mandatory. The default value is false.
|
|
27
|
+
*/
|
|
28
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
29
|
+
/**
|
|
30
|
+
* Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false.
|
|
31
|
+
*/
|
|
32
|
+
deprecated: z.ZodOptional<z.ZodBoolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Describes how the parameter value will be serialized. Only "simple" is allowed for headers.
|
|
35
|
+
*/
|
|
36
|
+
style: z.ZodOptional<z.ZodEnum<["matrix", "label", "simple", "form", "spaceDelimited", "pipeDelimited", "deepObject"]>>;
|
|
37
|
+
/**
|
|
38
|
+
* When this is true, parameter values of type array or object generate separate parameters
|
|
39
|
+
* for each value of the array or key-value pair of the map.
|
|
40
|
+
*/
|
|
41
|
+
explode: z.ZodOptional<z.ZodBoolean>;
|
|
42
|
+
/**
|
|
43
|
+
* The schema defining the type used for the header.
|
|
44
|
+
*/
|
|
45
|
+
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
|
|
46
|
+
/**
|
|
47
|
+
* Example of the parameter's potential value.
|
|
48
|
+
*/
|
|
49
|
+
example: z.ZodOptional<z.ZodAny>;
|
|
50
|
+
/**
|
|
51
|
+
* Examples of the parameter's potential value.
|
|
52
|
+
*/
|
|
53
|
+
examples: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
54
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
55
|
+
description: z.ZodOptional<z.ZodString>;
|
|
56
|
+
value: z.ZodOptional<z.ZodAny>;
|
|
57
|
+
externalValue: z.ZodOptional<z.ZodString>;
|
|
58
|
+
}, "strip", z.ZodTypeAny, {
|
|
59
|
+
description?: string | undefined;
|
|
60
|
+
summary?: string | undefined;
|
|
61
|
+
value?: any;
|
|
62
|
+
externalValue?: string | undefined;
|
|
63
|
+
}, {
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
summary?: string | undefined;
|
|
66
|
+
value?: any;
|
|
67
|
+
externalValue?: string | undefined;
|
|
68
|
+
}>>>;
|
|
69
|
+
/**
|
|
70
|
+
* A map containing the representations for the parameter.
|
|
71
|
+
* The key is the media type and the value describes it.
|
|
72
|
+
* Only one of content or schema should be specified.
|
|
73
|
+
*/
|
|
74
|
+
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
75
|
+
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
|
|
76
|
+
example: z.ZodOptional<z.ZodAny>;
|
|
77
|
+
examples: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
78
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
79
|
+
description: z.ZodOptional<z.ZodString>;
|
|
80
|
+
value: z.ZodOptional<z.ZodAny>;
|
|
81
|
+
externalValue: z.ZodOptional<z.ZodString>;
|
|
82
|
+
}, "strip", z.ZodTypeAny, {
|
|
83
|
+
description?: string | undefined;
|
|
84
|
+
summary?: string | undefined;
|
|
85
|
+
value?: any;
|
|
86
|
+
externalValue?: string | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
description?: string | undefined;
|
|
89
|
+
summary?: string | undefined;
|
|
90
|
+
value?: any;
|
|
91
|
+
externalValue?: string | undefined;
|
|
92
|
+
}>>>;
|
|
93
|
+
}, "strip", z.ZodTypeAny, {
|
|
94
|
+
example?: any;
|
|
95
|
+
examples?: Record<string, {
|
|
96
|
+
description?: string | undefined;
|
|
97
|
+
summary?: string | undefined;
|
|
98
|
+
value?: any;
|
|
99
|
+
externalValue?: string | undefined;
|
|
100
|
+
}> | undefined;
|
|
101
|
+
schema?: Record<string, any> | undefined;
|
|
102
|
+
}, {
|
|
103
|
+
example?: any;
|
|
104
|
+
examples?: Record<string, {
|
|
105
|
+
description?: string | undefined;
|
|
106
|
+
summary?: string | undefined;
|
|
107
|
+
value?: any;
|
|
108
|
+
externalValue?: string | undefined;
|
|
109
|
+
}> | undefined;
|
|
110
|
+
schema?: Record<string, any> | undefined;
|
|
111
|
+
}>>>;
|
|
112
|
+
}, "strip", z.ZodTypeAny, {
|
|
113
|
+
description?: string | undefined;
|
|
114
|
+
deprecated?: boolean | undefined;
|
|
115
|
+
content?: Record<string, {
|
|
116
|
+
example?: any;
|
|
117
|
+
examples?: Record<string, {
|
|
118
|
+
description?: string | undefined;
|
|
119
|
+
summary?: string | undefined;
|
|
120
|
+
value?: any;
|
|
121
|
+
externalValue?: string | undefined;
|
|
122
|
+
}> | undefined;
|
|
123
|
+
schema?: Record<string, any> | undefined;
|
|
124
|
+
}> | undefined;
|
|
125
|
+
required?: boolean | undefined;
|
|
126
|
+
example?: any;
|
|
127
|
+
examples?: Record<string, {
|
|
128
|
+
description?: string | undefined;
|
|
129
|
+
summary?: string | undefined;
|
|
130
|
+
value?: any;
|
|
131
|
+
externalValue?: string | undefined;
|
|
132
|
+
}> | undefined;
|
|
133
|
+
schema?: Record<string, any> | undefined;
|
|
134
|
+
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
135
|
+
explode?: boolean | undefined;
|
|
136
|
+
}, {
|
|
137
|
+
description?: string | undefined;
|
|
138
|
+
deprecated?: boolean | undefined;
|
|
139
|
+
content?: Record<string, {
|
|
140
|
+
example?: any;
|
|
141
|
+
examples?: Record<string, {
|
|
142
|
+
description?: string | undefined;
|
|
143
|
+
summary?: string | undefined;
|
|
144
|
+
value?: any;
|
|
145
|
+
externalValue?: string | undefined;
|
|
146
|
+
}> | undefined;
|
|
147
|
+
schema?: Record<string, any> | undefined;
|
|
148
|
+
}> | undefined;
|
|
149
|
+
required?: boolean | undefined;
|
|
150
|
+
example?: any;
|
|
151
|
+
examples?: Record<string, {
|
|
152
|
+
description?: string | undefined;
|
|
153
|
+
summary?: string | undefined;
|
|
154
|
+
value?: any;
|
|
155
|
+
externalValue?: string | undefined;
|
|
156
|
+
}> | undefined;
|
|
157
|
+
schema?: Record<string, any> | undefined;
|
|
158
|
+
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
|
|
159
|
+
explode?: boolean | undefined;
|
|
160
|
+
}>;
|
|
161
|
+
//# sourceMappingURL=header-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header-object.d.ts","sourceRoot":"","sources":["../../../../src/schemas/3.1/processed/header-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB;IAC7B;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;IAEH;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ExampleObjectSchema } from './example-object.js';
|
|
3
|
+
import { MediaTypeObjectSchemaWithoutEncoding } from './media-type-object-without-encoding.js';
|
|
4
|
+
import { SchemaObjectSchema } from './schema-object.js';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Header Object
|
|
8
|
+
*
|
|
9
|
+
* Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant
|
|
10
|
+
* Response Object and Encoding Object documentation for restrictions on which headers can be described.
|
|
11
|
+
*
|
|
12
|
+
* The Header Object follows the structure of the Parameter Object, including determining its serialization strategy
|
|
13
|
+
* based on whether schema or content is present, with the following changes:
|
|
14
|
+
*
|
|
15
|
+
* - name MUST NOT be specified, it is given in the corresponding headers map.
|
|
16
|
+
* - in MUST NOT be specified, it is implicitly in header.
|
|
17
|
+
* - All traits that are affected by the location MUST be applicable to a location of header (for example, style).
|
|
18
|
+
* This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to
|
|
19
|
+
* "simple".
|
|
20
|
+
*
|
|
21
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#header-object
|
|
22
|
+
*/
|
|
23
|
+
const HeaderObjectSchema = z.object({
|
|
24
|
+
/**
|
|
25
|
+
* A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text
|
|
26
|
+
* representation.
|
|
27
|
+
*/
|
|
28
|
+
description: z.string().optional(),
|
|
29
|
+
/**
|
|
30
|
+
* Determines whether this header is mandatory. The default value is false.
|
|
31
|
+
*/
|
|
32
|
+
required: z.boolean().optional(),
|
|
33
|
+
/**
|
|
34
|
+
* Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false.
|
|
35
|
+
*/
|
|
36
|
+
deprecated: z.boolean().optional(),
|
|
37
|
+
/**
|
|
38
|
+
* Describes how the parameter value will be serialized. Only "simple" is allowed for headers.
|
|
39
|
+
*/
|
|
40
|
+
style: z.enum(['matrix', 'label', 'simple', 'form', 'spaceDelimited', 'pipeDelimited', 'deepObject']).optional(),
|
|
41
|
+
/**
|
|
42
|
+
* When this is true, parameter values of type array or object generate separate parameters
|
|
43
|
+
* for each value of the array or key-value pair of the map.
|
|
44
|
+
*/
|
|
45
|
+
explode: z.boolean().optional(),
|
|
46
|
+
/**
|
|
47
|
+
* The schema defining the type used for the header.
|
|
48
|
+
*/
|
|
49
|
+
schema: SchemaObjectSchema.optional(),
|
|
50
|
+
/**
|
|
51
|
+
* Example of the parameter's potential value.
|
|
52
|
+
*/
|
|
53
|
+
example: z.any().optional(),
|
|
54
|
+
/**
|
|
55
|
+
* Examples of the parameter's potential value.
|
|
56
|
+
*/
|
|
57
|
+
examples: z.record(z.string(), ExampleObjectSchema).optional(),
|
|
58
|
+
/**
|
|
59
|
+
* A map containing the representations for the parameter.
|
|
60
|
+
* The key is the media type and the value describes it.
|
|
61
|
+
* Only one of content or schema should be specified.
|
|
62
|
+
*/
|
|
63
|
+
content: z.record(z.string(), MediaTypeObjectSchemaWithoutEncoding).optional(),
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
export { HeaderObjectSchema };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export { CallbackObjectSchema } from './callback-object.js';
|
|
2
|
+
export { ComponentsObjectSchema } from './components-object.js';
|
|
3
|
+
export { ContactObjectSchema } from './contact-object.js';
|
|
4
|
+
export { DiscriminatorObjectSchema } from './discriminator-object.js';
|
|
5
|
+
export { EncodingObjectSchema } from './encoding-object.js';
|
|
6
|
+
export { ExampleObjectSchema } from './example-object.js';
|
|
7
|
+
export { ExternalDocumentationObjectSchema } from './external-documentation-object.js';
|
|
8
|
+
export { HeaderObjectSchema } from './header-object.js';
|
|
9
|
+
export { InfoObjectSchema } from './info-object.js';
|
|
10
|
+
export { LicenseObjectSchema } from './license-object.js';
|
|
11
|
+
export { LinkObjectSchema } from './link-object.js';
|
|
12
|
+
export { MediaTypeObjectSchema } from './media-type-object.js';
|
|
13
|
+
export { MediaTypeObjectSchemaWithoutEncoding } from './media-type-object-without-encoding.js';
|
|
14
|
+
export { OpenApiObjectSchema } from './openapi-object.js';
|
|
15
|
+
export { OperationObjectSchema } from './operation-object.js';
|
|
16
|
+
export { ParameterObjectSchema } from './parameter-object.js';
|
|
17
|
+
export { PathItemObjectSchema } from './path-item-object.js';
|
|
18
|
+
export { PathsObjectSchema } from './paths-object.js';
|
|
19
|
+
export { RequestBodyObjectSchema } from './request-body-object.js';
|
|
20
|
+
export { ResponseObjectSchema } from './response-object.js';
|
|
21
|
+
export { ResponsesObjectSchema } from './responses-object.js';
|
|
22
|
+
export { RuntimeExpressionSchema } from './runtime-expression.js';
|
|
23
|
+
export { SchemaObjectSchema } from './schema-object.js';
|
|
24
|
+
export { SecurityRequirementObjectSchema } from './security-requirement-object.js';
|
|
25
|
+
export { ApiKeyInValues, ApiKeySchema, AuthorizationCodeFlowSchema, ClientCredentialsFlowSchema, HttpSchema, ImplicitFlowSchema, MutualTlsSchema, OAuthFlowObjectSchema, OAuthFlowsObjectSchema, OpenIdConnectSchema, PasswordFlowSchema, SecuritySchemeObjectSchema, } from './security-scheme-object.js';
|
|
26
|
+
export { ServerObjectSchema } from './server-object.js';
|
|
27
|
+
export { ServerVariableObjectSchema } from './server-variable-object.js';
|
|
28
|
+
export { TagObjectSchema } from './tag-object.js';
|
|
29
|
+
export { WebhooksObjectSchema } from './webhooks-object.js';
|
|
30
|
+
export { XmlObjectSchema } from './xml-object.js';
|
|
31
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/schemas/3.1/processed/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAA;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AAC3D,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAA;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,uBAAuB,CAAA;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAA;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAA;AAC/E,OAAO,EACL,cAAc,EACd,YAAY,EACZ,2BAA2B,EAC3B,2BAA2B,EAC3B,UAAU,EACV,kBAAkB,EAClB,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,0BAA0B,GAC3B,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAA;AACrE,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export { CallbackObjectSchema } from './callback-object.js';
|
|
2
|
+
export { ComponentsObjectSchema } from './components-object.js';
|
|
3
|
+
export { ContactObjectSchema } from './contact-object.js';
|
|
4
|
+
export { DiscriminatorObjectSchema } from './discriminator-object.js';
|
|
5
|
+
export { EncodingObjectSchema } from './encoding-object.js';
|
|
6
|
+
export { ExampleObjectSchema } from './example-object.js';
|
|
7
|
+
export { ExternalDocumentationObjectSchema } from './external-documentation-object.js';
|
|
8
|
+
export { HeaderObjectSchema } from './header-object.js';
|
|
9
|
+
export { InfoObjectSchema } from './info-object.js';
|
|
10
|
+
export { LicenseObjectSchema } from './license-object.js';
|
|
11
|
+
export { LinkObjectSchema } from './link-object.js';
|
|
12
|
+
export { MediaTypeObjectSchema } from './media-type-object.js';
|
|
13
|
+
export { MediaTypeObjectSchemaWithoutEncoding } from './media-type-object-without-encoding.js';
|
|
14
|
+
export { OpenApiObjectSchema } from './openapi-object.js';
|
|
15
|
+
export { OperationObjectSchema } from './operation-object.js';
|
|
16
|
+
export { ParameterObjectSchema } from './parameter-object.js';
|
|
17
|
+
export { PathItemObjectSchema } from './path-item-object.js';
|
|
18
|
+
export { PathsObjectSchema } from './paths-object.js';
|
|
19
|
+
export { RequestBodyObjectSchema } from './request-body-object.js';
|
|
20
|
+
export { ResponseObjectSchema } from './response-object.js';
|
|
21
|
+
export { ResponsesObjectSchema } from './responses-object.js';
|
|
22
|
+
export { RuntimeExpressionSchema } from './runtime-expression.js';
|
|
23
|
+
export { SchemaObjectSchema } from './schema-object.js';
|
|
24
|
+
export { SecurityRequirementObjectSchema } from './security-requirement-object.js';
|
|
25
|
+
export { ApiKeyInValues, ApiKeySchema, AuthorizationCodeFlowSchema, ClientCredentialsFlowSchema, HttpSchema, ImplicitFlowSchema, MutualTlsSchema, OAuthFlowObjectSchema, OAuthFlowsObjectSchema, OpenIdConnectSchema, PasswordFlowSchema, SecuritySchemeObjectSchema } from './security-scheme-object.js';
|
|
26
|
+
export { ServerObjectSchema } from './server-object.js';
|
|
27
|
+
export { ServerVariableObjectSchema } from './server-variable-object.js';
|
|
28
|
+
export { TagObjectSchema } from './tag-object.js';
|
|
29
|
+
export { WebhooksObjectSchema } from './webhooks-object.js';
|
|
30
|
+
export { XmlObjectSchema } from './xml-object.js';
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Info Object
|
|
4
|
+
*
|
|
5
|
+
* The object provides metadata about the API. The metadata MAY be used by the clients if needed,
|
|
6
|
+
* and MAY be presented in editing or documentation generation tools for convenience.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#info-object
|
|
9
|
+
*/
|
|
10
|
+
export declare const InfoObjectSchema: z.ZodObject<{
|
|
11
|
+
/**
|
|
12
|
+
* REQUIRED. The title of the API.
|
|
13
|
+
*/
|
|
14
|
+
title: z.ZodCatch<z.ZodString>;
|
|
15
|
+
/**
|
|
16
|
+
* A short summary of the API.
|
|
17
|
+
*/
|
|
18
|
+
summary: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
19
|
+
/**
|
|
20
|
+
* A description of the API. CommonMark syntax MAY be used for rich text representation.
|
|
21
|
+
*/
|
|
22
|
+
description: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
23
|
+
/**
|
|
24
|
+
* A URL to the Terms of Service for the API. This MUST be in the form of a URL.
|
|
25
|
+
*/
|
|
26
|
+
termsOfService: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
27
|
+
/**
|
|
28
|
+
* The contact information for the exposed API.
|
|
29
|
+
*/
|
|
30
|
+
contact: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
31
|
+
name: z.ZodOptional<z.ZodString>;
|
|
32
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
33
|
+
email: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
34
|
+
}, "strip", z.ZodTypeAny, {
|
|
35
|
+
url?: string | undefined;
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
email?: string | undefined;
|
|
38
|
+
}, {
|
|
39
|
+
url?: unknown;
|
|
40
|
+
name?: string | undefined;
|
|
41
|
+
email?: unknown;
|
|
42
|
+
}>>>;
|
|
43
|
+
/**
|
|
44
|
+
* The license information for the exposed API.
|
|
45
|
+
**/
|
|
46
|
+
license: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
47
|
+
name: z.ZodCatch<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
48
|
+
identifier: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
49
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
url?: string | undefined;
|
|
52
|
+
name?: string | null | undefined;
|
|
53
|
+
identifier?: string | undefined;
|
|
54
|
+
}, {
|
|
55
|
+
url?: unknown;
|
|
56
|
+
name?: unknown;
|
|
57
|
+
identifier?: unknown;
|
|
58
|
+
}>>>;
|
|
59
|
+
/**
|
|
60
|
+
* REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the
|
|
61
|
+
* version of the API being described or the version of the OpenAPI Description).
|
|
62
|
+
*/
|
|
63
|
+
version: z.ZodCatch<z.ZodString>;
|
|
64
|
+
}, "strip", z.ZodTypeAny, {
|
|
65
|
+
title: string;
|
|
66
|
+
version: string;
|
|
67
|
+
description?: string | undefined;
|
|
68
|
+
termsOfService?: string | undefined;
|
|
69
|
+
contact?: {
|
|
70
|
+
url?: string | undefined;
|
|
71
|
+
name?: string | undefined;
|
|
72
|
+
email?: string | undefined;
|
|
73
|
+
} | undefined;
|
|
74
|
+
license?: {
|
|
75
|
+
url?: string | undefined;
|
|
76
|
+
name?: string | null | undefined;
|
|
77
|
+
identifier?: string | undefined;
|
|
78
|
+
} | undefined;
|
|
79
|
+
summary?: string | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
title?: unknown;
|
|
82
|
+
description?: unknown;
|
|
83
|
+
termsOfService?: unknown;
|
|
84
|
+
contact?: unknown;
|
|
85
|
+
license?: unknown;
|
|
86
|
+
version?: unknown;
|
|
87
|
+
summary?: unknown;
|
|
88
|
+
}>;
|
|
89
|
+
//# sourceMappingURL=info-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info-object.d.ts","sourceRoot":"","sources":["../../../../src/schemas/3.1/processed/info-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;IAEH;;QAEI;;;;;;;;;;;;;;IAEJ;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { ContactObjectSchema } from './contact-object.js';
|
|
3
|
+
import { LicenseObjectSchema } from './license-object.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Info Object
|
|
7
|
+
*
|
|
8
|
+
* The object provides metadata about the API. The metadata MAY be used by the clients if needed,
|
|
9
|
+
* and MAY be presented in editing or documentation generation tools for convenience.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#info-object
|
|
12
|
+
*/
|
|
13
|
+
const InfoObjectSchema = z.object({
|
|
14
|
+
/**
|
|
15
|
+
* REQUIRED. The title of the API.
|
|
16
|
+
*/
|
|
17
|
+
title: z.string().catch('API'),
|
|
18
|
+
/**
|
|
19
|
+
* A short summary of the API.
|
|
20
|
+
*/
|
|
21
|
+
summary: z.string().optional().catch(undefined),
|
|
22
|
+
/**
|
|
23
|
+
* A description of the API. CommonMark syntax MAY be used for rich text representation.
|
|
24
|
+
*/
|
|
25
|
+
description: z.string().optional().catch(undefined),
|
|
26
|
+
/**
|
|
27
|
+
* A URL to the Terms of Service for the API. This MUST be in the form of a URL.
|
|
28
|
+
*/
|
|
29
|
+
termsOfService: z.string().url().optional().catch(undefined),
|
|
30
|
+
/**
|
|
31
|
+
* The contact information for the exposed API.
|
|
32
|
+
*/
|
|
33
|
+
contact: ContactObjectSchema.optional().catch(undefined),
|
|
34
|
+
/**
|
|
35
|
+
* The license information for the exposed API.
|
|
36
|
+
**/
|
|
37
|
+
license: LicenseObjectSchema.optional().catch(undefined),
|
|
38
|
+
/**
|
|
39
|
+
* REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the
|
|
40
|
+
* version of the API being described or the version of the OpenAPI Description).
|
|
41
|
+
*/
|
|
42
|
+
version: z.string().catch('1.0'),
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export { InfoObjectSchema };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* License Object
|
|
4
|
+
*
|
|
5
|
+
* License information for the exposed API.
|
|
6
|
+
*
|
|
7
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#license-object
|
|
8
|
+
*/
|
|
9
|
+
export declare const LicenseObjectSchema: z.ZodObject<{
|
|
10
|
+
/** REQUIRED. The license name used for the API. */
|
|
11
|
+
name: z.ZodCatch<z.ZodNullable<z.ZodOptional<z.ZodString>>>;
|
|
12
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
13
|
+
identifier: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
14
|
+
/**
|
|
15
|
+
* 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.
|
|
16
|
+
*/
|
|
17
|
+
url: z.ZodCatch<z.ZodOptional<z.ZodString>>;
|
|
18
|
+
}, "strip", z.ZodTypeAny, {
|
|
19
|
+
url?: string | undefined;
|
|
20
|
+
name?: string | null | undefined;
|
|
21
|
+
identifier?: string | undefined;
|
|
22
|
+
}, {
|
|
23
|
+
url?: unknown;
|
|
24
|
+
name?: unknown;
|
|
25
|
+
identifier?: unknown;
|
|
26
|
+
}>;
|
|
27
|
+
//# sourceMappingURL=license-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license-object.d.ts","sourceRoot":"","sources":["../../../../src/schemas/3.1/processed/license-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB;IAC9B,mDAAmD;;IAEnD,2GAA2G;;IAE3G;;OAEG;;;;;;;;;;EAEH,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* License Object
|
|
5
|
+
*
|
|
6
|
+
* License information for the exposed API.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#license-object
|
|
9
|
+
*/
|
|
10
|
+
const LicenseObjectSchema = z.object({
|
|
11
|
+
/** REQUIRED. The license name used for the API. */
|
|
12
|
+
name: z.string().optional().nullable().catch(null),
|
|
13
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
14
|
+
identifier: z.string().optional().catch(undefined),
|
|
15
|
+
/**
|
|
16
|
+
* 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
|
+
*/
|
|
18
|
+
url: z.string().url().optional().catch(undefined),
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
export { LicenseObjectSchema };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Link Object
|
|
4
|
+
*
|
|
5
|
+
* The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the
|
|
6
|
+
* caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between
|
|
7
|
+
* responses and other operations.
|
|
8
|
+
*
|
|
9
|
+
* Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link
|
|
10
|
+
* information in the runtime response.
|
|
11
|
+
*
|
|
12
|
+
* For computing links and providing instructions to execute them, a runtime expression is used for accessing values in an
|
|
13
|
+
* operation and using them as parameters while invoking the linked operation.
|
|
14
|
+
*
|
|
15
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#link-object
|
|
16
|
+
*/
|
|
17
|
+
export declare const LinkObjectSchema: z.ZodObject<{
|
|
18
|
+
/**
|
|
19
|
+
* A URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to
|
|
20
|
+
* an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI Description.
|
|
21
|
+
*/
|
|
22
|
+
operationRef: z.ZodOptional<z.ZodString>;
|
|
23
|
+
/**
|
|
24
|
+
* The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually
|
|
25
|
+
* exclusive of the operationRef field.
|
|
26
|
+
*/
|
|
27
|
+
operationId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
/**
|
|
29
|
+
* A map representing parameters to pass to an operation as specified with operationId or identified via
|
|
30
|
+
* operationRef. The key is the parameter name to be used (optionally qualified with the parameter location, e.g.
|
|
31
|
+
* path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated
|
|
32
|
+
* and passed to the linked operation.
|
|
33
|
+
*/
|
|
34
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
|
|
35
|
+
/**
|
|
36
|
+
* A literal value or {expression} to use as a request body when calling the target operation.
|
|
37
|
+
*/
|
|
38
|
+
requestBody: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
39
|
+
/**
|
|
40
|
+
* A description of the link. CommonMark syntax MAY be used for rich text representation.
|
|
41
|
+
*/
|
|
42
|
+
description: z.ZodOptional<z.ZodString>;
|
|
43
|
+
/**
|
|
44
|
+
* A server object to be used by the target operation.
|
|
45
|
+
*/
|
|
46
|
+
server: z.ZodOptional<z.ZodObject<{
|
|
47
|
+
url: z.ZodString;
|
|
48
|
+
description: z.ZodOptional<z.ZodString>;
|
|
49
|
+
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
50
|
+
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
51
|
+
default: z.ZodOptional<z.ZodString>;
|
|
52
|
+
description: z.ZodOptional<z.ZodString>;
|
|
53
|
+
}, "strip", z.ZodTypeAny, {
|
|
54
|
+
description?: string | undefined;
|
|
55
|
+
default?: string | undefined;
|
|
56
|
+
enum?: string[] | undefined;
|
|
57
|
+
}, {
|
|
58
|
+
description?: string | undefined;
|
|
59
|
+
default?: string | undefined;
|
|
60
|
+
enum?: string[] | undefined;
|
|
61
|
+
}>>>;
|
|
62
|
+
}, "strip", z.ZodTypeAny, {
|
|
63
|
+
url: string;
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
variables?: Record<string, {
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
default?: string | undefined;
|
|
68
|
+
enum?: string[] | undefined;
|
|
69
|
+
}> | undefined;
|
|
70
|
+
}, {
|
|
71
|
+
url: string;
|
|
72
|
+
description?: string | undefined;
|
|
73
|
+
variables?: Record<string, {
|
|
74
|
+
description?: string | undefined;
|
|
75
|
+
default?: string | undefined;
|
|
76
|
+
enum?: string[] | undefined;
|
|
77
|
+
}> | undefined;
|
|
78
|
+
}>>;
|
|
79
|
+
}, "strip", z.ZodTypeAny, {
|
|
80
|
+
description?: string | undefined;
|
|
81
|
+
operationId?: string | undefined;
|
|
82
|
+
parameters?: Record<string, string> | undefined;
|
|
83
|
+
requestBody?: string | undefined;
|
|
84
|
+
operationRef?: string | undefined;
|
|
85
|
+
server?: {
|
|
86
|
+
url: string;
|
|
87
|
+
description?: string | undefined;
|
|
88
|
+
variables?: Record<string, {
|
|
89
|
+
description?: string | undefined;
|
|
90
|
+
default?: string | undefined;
|
|
91
|
+
enum?: string[] | undefined;
|
|
92
|
+
}> | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
}, {
|
|
95
|
+
description?: string | undefined;
|
|
96
|
+
operationId?: string | undefined;
|
|
97
|
+
parameters?: Record<string, string> | undefined;
|
|
98
|
+
requestBody?: string | undefined;
|
|
99
|
+
operationRef?: string | undefined;
|
|
100
|
+
server?: {
|
|
101
|
+
url: string;
|
|
102
|
+
description?: string | undefined;
|
|
103
|
+
variables?: Record<string, {
|
|
104
|
+
description?: string | undefined;
|
|
105
|
+
default?: string | undefined;
|
|
106
|
+
enum?: string[] | undefined;
|
|
107
|
+
}> | undefined;
|
|
108
|
+
} | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
//# sourceMappingURL=link-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link-object.d.ts","sourceRoot":"","sources":["../../../../src/schemas/3.1/processed/link-object.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB;IAC3B;;;OAGG;;IAEH;;;OAGG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEH,CAAA"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { RuntimeExpressionSchema } from './runtime-expression.js';
|
|
3
|
+
import { ServerObjectSchema } from './server-object.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Link Object
|
|
7
|
+
*
|
|
8
|
+
* The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the
|
|
9
|
+
* caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between
|
|
10
|
+
* responses and other operations.
|
|
11
|
+
*
|
|
12
|
+
* Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link
|
|
13
|
+
* information in the runtime response.
|
|
14
|
+
*
|
|
15
|
+
* For computing links and providing instructions to execute them, a runtime expression is used for accessing values in an
|
|
16
|
+
* operation and using them as parameters while invoking the linked operation.
|
|
17
|
+
*
|
|
18
|
+
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#link-object
|
|
19
|
+
*/
|
|
20
|
+
const LinkObjectSchema = z.object({
|
|
21
|
+
/**
|
|
22
|
+
* A URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to
|
|
23
|
+
* an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI Description.
|
|
24
|
+
*/
|
|
25
|
+
operationRef: z.string().optional(),
|
|
26
|
+
/**
|
|
27
|
+
* The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually
|
|
28
|
+
* exclusive of the operationRef field.
|
|
29
|
+
*/
|
|
30
|
+
operationId: z.string().optional(),
|
|
31
|
+
/**
|
|
32
|
+
* A map representing parameters to pass to an operation as specified with operationId or identified via
|
|
33
|
+
* operationRef. The key is the parameter name to be used (optionally qualified with the parameter location, e.g.
|
|
34
|
+
* path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated
|
|
35
|
+
* and passed to the linked operation.
|
|
36
|
+
*/
|
|
37
|
+
parameters: z.record(z.string(), RuntimeExpressionSchema).optional(),
|
|
38
|
+
/**
|
|
39
|
+
* A literal value or {expression} to use as a request body when calling the target operation.
|
|
40
|
+
*/
|
|
41
|
+
requestBody: RuntimeExpressionSchema.optional(),
|
|
42
|
+
/**
|
|
43
|
+
* A description of the link. CommonMark syntax MAY be used for rich text representation.
|
|
44
|
+
*/
|
|
45
|
+
description: z.string().optional(),
|
|
46
|
+
/**
|
|
47
|
+
* A server object to be used by the target operation.
|
|
48
|
+
*/
|
|
49
|
+
server: ServerObjectSchema.optional(),
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
export { LinkObjectSchema };
|