@scalar/workspace-store 0.56.1 → 0.57.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 +12 -0
- package/dist/entities/auth/schema.d.ts +220 -20
- package/dist/entities/auth/schema.d.ts.map +1 -1
- package/dist/schemas/reference-config/index.d.ts +28 -4
- package/dist/schemas/reference-config/index.d.ts.map +1 -1
- package/dist/schemas/reference-config/settings.d.ts +28 -4
- package/dist/schemas/reference-config/settings.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts +19 -1
- package/dist/schemas/v3.1/strict/oauth-flow.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/oauth-flow.js +6 -1
- package/dist/schemas/v3.1/strict/oauthflows.d.ts +16 -0
- package/dist/schemas/v3.1/strict/oauthflows.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/openapi-document.d.ts +980 -140
- package/dist/schemas/v3.1/strict/openapi-document.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.d.ts +14 -5
- package/dist/schemas/v3.1/strict/security-scheme.d.ts.map +1 -1
- package/dist/schemas/v3.1/strict/security-scheme.js +5 -2
- package/dist/schemas/v3.2/openapi/index.d.ts +144 -0
- package/dist/schemas/v3.2/openapi/index.d.ts.map +1 -0
- package/dist/schemas/v3.2/openapi/index.js +713 -0
- package/dist/schemas/v3.2/openapi/reference.d.ts +4 -0
- package/dist/schemas/v3.2/openapi/reference.d.ts.map +1 -0
- package/dist/schemas/v3.2/openapi/reference.js +29 -0
- package/dist/schemas/v3.2/strict/callback.d.ts +15 -0
- package/dist/schemas/v3.2/strict/callback.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/callback.js +6 -0
- package/dist/schemas/v3.2/strict/components.d.ts +173 -0
- package/dist/schemas/v3.2/strict/components.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/components.js +29 -0
- package/dist/schemas/v3.2/strict/contact.d.ts +19 -0
- package/dist/schemas/v3.2/strict/contact.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/contact.js +10 -0
- package/dist/schemas/v3.2/strict/discriminator.d.ts +27 -0
- package/dist/schemas/v3.2/strict/discriminator.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/discriminator.js +14 -0
- package/dist/schemas/v3.2/strict/encoding.d.ts +62 -0
- package/dist/schemas/v3.2/strict/encoding.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/encoding.js +33 -0
- package/dist/schemas/v3.2/strict/example.d.ts +50 -0
- package/dist/schemas/v3.2/strict/example.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/example.js +22 -0
- package/dist/schemas/v3.2/strict/external-documentation.d.ts +15 -0
- package/dist/schemas/v3.2/strict/external-documentation.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/external-documentation.js +8 -0
- package/dist/schemas/v3.2/strict/header.d.ts +97 -0
- package/dist/schemas/v3.2/strict/header.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/header.js +39 -0
- package/dist/schemas/v3.2/strict/info.d.ts +54 -0
- package/dist/schemas/v3.2/strict/info.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/info.js +24 -0
- package/dist/schemas/v3.2/strict/license.d.ts +19 -0
- package/dist/schemas/v3.2/strict/license.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/license.js +10 -0
- package/dist/schemas/v3.2/strict/link.d.ts +44 -0
- package/dist/schemas/v3.2/strict/link.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/link.js +23 -0
- package/dist/schemas/v3.2/strict/media-type.d.ts +78 -0
- package/dist/schemas/v3.2/strict/media-type.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/media-type.js +26 -0
- package/dist/schemas/v3.2/strict/oauth-flow.d.ts +159 -0
- package/dist/schemas/v3.2/strict/oauth-flow.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/oauth-flow.js +44 -0
- package/dist/schemas/v3.2/strict/oauthflows.d.ts +116 -0
- package/dist/schemas/v3.2/strict/oauthflows.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/oauthflows.js +17 -0
- package/dist/schemas/v3.2/strict/openapi-document.d.ts +64576 -0
- package/dist/schemas/v3.2/strict/openapi-document.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/openapi-document.js +154 -0
- package/dist/schemas/v3.2/strict/operation.d.ts +165 -0
- package/dist/schemas/v3.2/strict/operation.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/operation.js +40 -0
- package/dist/schemas/v3.2/strict/parameter.d.ts +142 -0
- package/dist/schemas/v3.2/strict/parameter.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/parameter.js +58 -0
- package/dist/schemas/v3.2/strict/path-item.d.ts +189 -0
- package/dist/schemas/v3.2/strict/path-item.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/path-item.js +41 -0
- package/dist/schemas/v3.2/strict/paths.d.ts +20 -0
- package/dist/schemas/v3.2/strict/paths.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/paths.js +9 -0
- package/dist/schemas/v3.2/strict/ref-definitions.d.ts +76 -0
- package/dist/schemas/v3.2/strict/ref-definitions.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/ref-definitions.js +80 -0
- package/dist/schemas/v3.2/strict/reference.d.ts +63 -0
- package/dist/schemas/v3.2/strict/reference.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/reference.js +23 -0
- package/dist/schemas/v3.2/strict/request-body.d.ts +23 -0
- package/dist/schemas/v3.2/strict/request-body.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/request-body.js +13 -0
- package/dist/schemas/v3.2/strict/response.d.ts +50 -0
- package/dist/schemas/v3.2/strict/response.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/response.js +15 -0
- package/dist/schemas/v3.2/strict/responses.d.ts +32 -0
- package/dist/schemas/v3.2/strict/responses.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/responses.js +13 -0
- package/dist/schemas/v3.2/strict/schema.d.ts +1330 -0
- package/dist/schemas/v3.2/strict/schema.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/schema.js +205 -0
- package/dist/schemas/v3.2/strict/security-requirement.d.ts +23 -0
- package/dist/schemas/v3.2/strict/security-requirement.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/security-requirement.js +13 -0
- package/dist/schemas/v3.2/strict/security-scheme.d.ts +95 -0
- package/dist/schemas/v3.2/strict/security-scheme.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/security-scheme.js +46 -0
- package/dist/schemas/v3.2/strict/server-variable.d.ts +19 -0
- package/dist/schemas/v3.2/strict/server-variable.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/server-variable.js +10 -0
- package/dist/schemas/v3.2/strict/server.d.ts +24 -0
- package/dist/schemas/v3.2/strict/server.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/server.js +13 -0
- package/dist/schemas/v3.2/strict/tag.d.ts +44 -0
- package/dist/schemas/v3.2/strict/tag.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/tag.js +22 -0
- package/dist/schemas/v3.2/strict/type-guards.d.ts +24 -0
- package/dist/schemas/v3.2/strict/type-guards.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/type-guards.js +25 -0
- package/dist/schemas/v3.2/strict/xml.d.ts +39 -0
- package/dist/schemas/v3.2/strict/xml.d.ts.map +1 -0
- package/dist/schemas/v3.2/strict/xml.js +26 -0
- package/package.json +5 -5
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
/** Allows referencing an external resource for extended documentation. */
|
|
3
|
+
export const ExternalDocumentationObjectSchemaDefinition = Type.Object({
|
|
4
|
+
/** REQUIRED. The URI for the target documentation. This MUST be in the form of a URI. */
|
|
5
|
+
url: Type.String(),
|
|
6
|
+
/** A description of the target documentation. CommonMark syntax MAY be used for rich text representation. */
|
|
7
|
+
description: Type.Optional(Type.String()),
|
|
8
|
+
});
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { ExampleObject } from './example.js';
|
|
2
|
+
import type { MediaTypeObject } from './media-type.js';
|
|
3
|
+
import { type ReferenceType } from './reference.js';
|
|
4
|
+
import type { SchemaObject } from './schema.js';
|
|
5
|
+
/** Common properties in both sides of the union */
|
|
6
|
+
type HeaderBase = {
|
|
7
|
+
/** A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
|
|
8
|
+
description?: string;
|
|
9
|
+
/** Determines whether this header is mandatory. The default value is false. */
|
|
10
|
+
required?: boolean;
|
|
11
|
+
/** Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false. */
|
|
12
|
+
deprecated?: boolean;
|
|
13
|
+
};
|
|
14
|
+
/** Header object that uses schema */
|
|
15
|
+
type HeaderWithSchemaObject = HeaderBase & {
|
|
16
|
+
/** Describes how the header value will be serialized. The default (and only legal value for headers) is "simple". */
|
|
17
|
+
style?: string;
|
|
18
|
+
/** When this is true, header values of type array or object generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see Style Examples. For other data types this field has no effect. The default value is false. */
|
|
19
|
+
explode?: boolean;
|
|
20
|
+
/** The schema defining the type used for the header. */
|
|
21
|
+
schema?: ReferenceType<SchemaObject>;
|
|
22
|
+
/** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
23
|
+
example?: any;
|
|
24
|
+
/** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
25
|
+
examples?: Record<string, ReferenceType<ExampleObject>>;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant Response Object and Encoding Object documentation for restrictions on which headers can be described.
|
|
29
|
+
*
|
|
30
|
+
* The Header Object follows the structure of the Parameter Object, including determining its serialization strategy based on whether schema or content is present, with the following changes:
|
|
31
|
+
*
|
|
32
|
+
* - name MUST NOT be specified, it is given in the corresponding headers map.
|
|
33
|
+
* - in MUST NOT be specified, it is implicitly in header.
|
|
34
|
+
* - All traits that are affected by the location MUST be applicable to a location of header (for example, style). This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to "simple".
|
|
35
|
+
*/
|
|
36
|
+
export declare const HeaderObjectSchemaDefinition: import("@scalar/typebox").TUnion<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
37
|
+
/** A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
|
|
38
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
39
|
+
/** Determines whether this header is mandatory. The default value is false. */
|
|
40
|
+
required: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
41
|
+
/** Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false. */
|
|
42
|
+
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
43
|
+
}>, import("@scalar/typebox").TObject<{
|
|
44
|
+
/** Describes how the header value will be serialized. The default (and only legal value for headers) is "simple". */
|
|
45
|
+
style: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
46
|
+
/** When this is true, header values of type array or object generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see Style Examples. For other data types this field has no effect. The default value is false. */
|
|
47
|
+
explode: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
48
|
+
/** The schema defining the type used for the header. */
|
|
49
|
+
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
50
|
+
$ref: import("@scalar/typebox").TString;
|
|
51
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
52
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
53
|
+
}>, import("@scalar/typebox").TObject<{
|
|
54
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
55
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
56
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
57
|
+
'$ref-value': import("@scalar/typebox").TRef<"SchemaObject">;
|
|
58
|
+
}>]>]>>;
|
|
59
|
+
/** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
60
|
+
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TAny>;
|
|
61
|
+
/** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
62
|
+
examples: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"ExampleObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
63
|
+
$ref: import("@scalar/typebox").TString;
|
|
64
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
65
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
66
|
+
}>, import("@scalar/typebox").TObject<{
|
|
67
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
68
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
69
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
70
|
+
'$ref-value': import("@scalar/typebox").TRef<"ExampleObject">;
|
|
71
|
+
}>]>]>>>;
|
|
72
|
+
}>]>, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
73
|
+
/** A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
|
|
74
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
75
|
+
/** Determines whether this header is mandatory. The default value is false. */
|
|
76
|
+
required: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
77
|
+
/** Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false. */
|
|
78
|
+
deprecated: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
79
|
+
}>, import("@scalar/typebox").TObject<{
|
|
80
|
+
content: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"MediaTypeObject">>>;
|
|
81
|
+
}>]>]>;
|
|
82
|
+
/** Header object that uses content */
|
|
83
|
+
type HeaderWithContent = HeaderBase & {
|
|
84
|
+
content?: Record<string, MediaTypeObject>;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant Response Object and Encoding Object documentation for restrictions on which headers can be described.
|
|
88
|
+
*
|
|
89
|
+
* The Header Object follows the structure of the Parameter Object, including determining its serialization strategy based on whether schema or content is present, with the following changes:
|
|
90
|
+
*
|
|
91
|
+
* - name MUST NOT be specified, it is given in the corresponding headers map.
|
|
92
|
+
* - in MUST NOT be specified, it is implicitly in header.
|
|
93
|
+
* - All traits that are affected by the location MUST be applicable to a location of header (for example, style). This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to "simple".
|
|
94
|
+
*/
|
|
95
|
+
export type HeaderObject = HeaderWithSchemaObject | HeaderWithContent;
|
|
96
|
+
export {};
|
|
97
|
+
//# sourceMappingURL=header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.2/strict/header.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAEnD,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAW5C,mDAAmD;AACnD,KAAK,UAAU,GAAG;IAChB,yIAAyI;IACzI,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+GAA+G;IAC/G,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB,CAAA;AAkBD,qCAAqC;AACrC,KAAK,sBAAsB,GAAG,UAAU,GAAG;IACzC,qHAAqH;IACrH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,+QAA+Q;IAC/Q,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wDAAwD;IACxD,MAAM,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IACpC,kIAAkI;IAClI,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,mIAAmI;IACnI,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,CAAA;CACxD,CAAA;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,4BAA4B;IAzDvC,yIAAyI;;IAEzI,+EAA+E;;IAE/E,+GAA+G;;;IAiB7G,qHAAqH;;IAErH,+QAA+Q;;IAE/Q,wDAAwD;;;;;;;;;;;IAExD,kIAAkI;;IAElI,mIAAmI;;;;;;;;;;;;IA7BrI,yIAAyI;;IAEzI,+EAA+E;;IAE/E,+GAA+G;;;;MA6D/G,CAAA;AAEF,sCAAsC;AACtC,KAAK,iBAAiB,GAAG,UAAU,GAAG;IACpC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;CAC1C,CAAA;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,sBAAsB,GAAG,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { compose } from '../../../schemas/compose.js';
|
|
3
|
+
import { ExampleObjectRef, MediaTypeObjectRef, SchemaObjectRef } from './ref-definitions.js';
|
|
4
|
+
import { reference } from './reference.js';
|
|
5
|
+
const HeaderObjectSchemaBase = Type.Object({
|
|
6
|
+
/** A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. */
|
|
7
|
+
description: Type.Optional(Type.String()),
|
|
8
|
+
/** Determines whether this header is mandatory. The default value is false. */
|
|
9
|
+
required: Type.Optional(Type.Boolean()),
|
|
10
|
+
/** Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false. */
|
|
11
|
+
deprecated: Type.Optional(Type.Boolean()),
|
|
12
|
+
});
|
|
13
|
+
const HeaderObjectWithSchemaSchema = compose(HeaderObjectSchemaBase, Type.Object({
|
|
14
|
+
/** Describes how the header value will be serialized. The default (and only legal value for headers) is "simple". */
|
|
15
|
+
style: Type.Optional(Type.String()),
|
|
16
|
+
/** When this is true, header values of type array or object generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see Style Examples. For other data types this field has no effect. The default value is false. */
|
|
17
|
+
explode: Type.Optional(Type.Boolean()),
|
|
18
|
+
/** The schema defining the type used for the header. */
|
|
19
|
+
schema: Type.Optional(Type.Union([SchemaObjectRef, reference(SchemaObjectRef)])),
|
|
20
|
+
/** Example of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
21
|
+
example: Type.Optional(Type.Any()),
|
|
22
|
+
/** Examples of the header's potential value; see Working With Examples. https://swagger.io/specification/#working-with-examples */
|
|
23
|
+
examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),
|
|
24
|
+
}));
|
|
25
|
+
/**
|
|
26
|
+
* Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant Response Object and Encoding Object documentation for restrictions on which headers can be described.
|
|
27
|
+
*
|
|
28
|
+
* The Header Object follows the structure of the Parameter Object, including determining its serialization strategy based on whether schema or content is present, with the following changes:
|
|
29
|
+
*
|
|
30
|
+
* - name MUST NOT be specified, it is given in the corresponding headers map.
|
|
31
|
+
* - in MUST NOT be specified, it is implicitly in header.
|
|
32
|
+
* - All traits that are affected by the location MUST be applicable to a location of header (for example, style). This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to "simple".
|
|
33
|
+
*/
|
|
34
|
+
export const HeaderObjectSchemaDefinition = Type.Union([
|
|
35
|
+
HeaderObjectWithSchemaSchema,
|
|
36
|
+
compose(HeaderObjectSchemaBase, Type.Object({
|
|
37
|
+
content: Type.Optional(Type.Record(Type.String(), MediaTypeObjectRef)),
|
|
38
|
+
})),
|
|
39
|
+
]);
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { type XScalarLinks } from '../../../schemas/extensions/document/x-scalar-links.js';
|
|
2
|
+
import { type XScalarSdkInstallation } from '../../../schemas/extensions/document/x-scalar-sdk-installation.js';
|
|
3
|
+
import type { ContactObject } from './contact.js';
|
|
4
|
+
import type { LicenseObject } from './license.js';
|
|
5
|
+
/**
|
|
6
|
+
* The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
|
|
7
|
+
*/
|
|
8
|
+
export declare const InfoObjectSchemaDefinition: import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
9
|
+
/** REQUIRED. The title of the API. */
|
|
10
|
+
title: import("@scalar/typebox").TString;
|
|
11
|
+
/** REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the version of the API being described or the version of the OpenAPI Description). */
|
|
12
|
+
version: import("@scalar/typebox").TString;
|
|
13
|
+
/** A short summary of the API. */
|
|
14
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
15
|
+
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
16
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
17
|
+
/** A URI for the Terms of Service for the API. This MUST be in the form of a URI. */
|
|
18
|
+
termsOfService: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
19
|
+
/** The contact information for the exposed API. */
|
|
20
|
+
contact: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"ContactObject">>;
|
|
21
|
+
/** The license information for the exposed API. */
|
|
22
|
+
license: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"LicenseObject">>;
|
|
23
|
+
}>, import("@scalar/typebox").TObject<{
|
|
24
|
+
'x-scalar-sdk-installation': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
25
|
+
lang: import("@scalar/typebox").TString;
|
|
26
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
27
|
+
source: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
28
|
+
}>>>;
|
|
29
|
+
}>, import("@scalar/typebox").TObject<{
|
|
30
|
+
'x-scalar-links': import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TObject<{
|
|
31
|
+
name: import("@scalar/typebox").TString;
|
|
32
|
+
url: import("@scalar/typebox").TString;
|
|
33
|
+
}>>>;
|
|
34
|
+
}>]>;
|
|
35
|
+
/**
|
|
36
|
+
* The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
|
|
37
|
+
*/
|
|
38
|
+
export type InfoObject = {
|
|
39
|
+
/** REQUIRED. The title of the API. */
|
|
40
|
+
title: string;
|
|
41
|
+
/** REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the version of the API being described or the version of the OpenAPI Description). */
|
|
42
|
+
version: string;
|
|
43
|
+
/** A short summary of the API. */
|
|
44
|
+
summary?: string;
|
|
45
|
+
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
46
|
+
description?: string;
|
|
47
|
+
/** A URI for the Terms of Service for the API. This MUST be in the form of a URI. */
|
|
48
|
+
termsOfService?: string;
|
|
49
|
+
/** The contact information for the exposed API. */
|
|
50
|
+
contact?: ContactObject;
|
|
51
|
+
/** The license information for the exposed API. */
|
|
52
|
+
license?: LicenseObject;
|
|
53
|
+
} & XScalarSdkInstallation & XScalarLinks;
|
|
54
|
+
//# sourceMappingURL=info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"info.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.2/strict/info.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,YAAY,EAAsB,MAAM,8CAA8C,CAAA;AACpG,OAAO,EACL,KAAK,sBAAsB,EAE5B,MAAM,yDAAyD,CAAA;AAEhE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAG9C;;GAEG;AACH,eAAO,MAAM,0BAA0B;IAEnC,sCAAsC;;IAEtC,oMAAoM;;IAEpM,kCAAkC;;IAElC,4FAA4F;;IAE5F,qFAAqF;;IAErF,mDAAmD;;IAEnD,mDAAmD;;;;;;;;;;;;;IAKtD,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAA;IACb,oMAAoM;IACpM,OAAO,EAAE,MAAM,CAAA;IACf,kCAAkC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4FAA4F;IAC5F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,qFAAqF;IACrF,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,mDAAmD;IACnD,OAAO,CAAC,EAAE,aAAa,CAAA;CACxB,GAAG,sBAAsB,GACxB,YAAY,CAAA"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { compose } from '../../../schemas/compose.js';
|
|
3
|
+
import { XScalarLinksSchema } from '../../../schemas/extensions/document/x-scalar-links.js';
|
|
4
|
+
import { XScalarSdkInstallationSchema, } from '../../../schemas/extensions/document/x-scalar-sdk-installation.js';
|
|
5
|
+
import { ContactObjectRef, LicenseObjectRef } from './ref-definitions.js';
|
|
6
|
+
/**
|
|
7
|
+
* The object provides metadata about the API. The metadata MAY be used by the clients if needed, and MAY be presented in editing or documentation generation tools for convenience.
|
|
8
|
+
*/
|
|
9
|
+
export const InfoObjectSchemaDefinition = compose(Type.Object({
|
|
10
|
+
/** REQUIRED. The title of the API. */
|
|
11
|
+
title: Type.String(),
|
|
12
|
+
/** REQUIRED. The version of the OpenAPI Document (which is distinct from the OpenAPI Specification version or the version of the API being described or the version of the OpenAPI Description). */
|
|
13
|
+
version: Type.String(),
|
|
14
|
+
/** A short summary of the API. */
|
|
15
|
+
summary: Type.Optional(Type.String()),
|
|
16
|
+
/** A description of the API. CommonMark syntax MAY be used for rich text representation. */
|
|
17
|
+
description: Type.Optional(Type.String()),
|
|
18
|
+
/** A URI for the Terms of Service for the API. This MUST be in the form of a URI. */
|
|
19
|
+
termsOfService: Type.Optional(Type.String()),
|
|
20
|
+
/** The contact information for the exposed API. */
|
|
21
|
+
contact: Type.Optional(ContactObjectRef),
|
|
22
|
+
/** The license information for the exposed API. */
|
|
23
|
+
license: Type.Optional(LicenseObjectRef),
|
|
24
|
+
}), XScalarSdkInstallationSchema, XScalarLinksSchema);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** The license information for the exposed API. */
|
|
2
|
+
export declare const LicenseObjectSchemaDefinition: import("@scalar/typebox").TObject<{
|
|
3
|
+
/** REQUIRED. The license name used for the API. */
|
|
4
|
+
name: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
5
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
6
|
+
identifier: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
7
|
+
/** 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. */
|
|
8
|
+
url: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
9
|
+
}>;
|
|
10
|
+
/** The license information for the exposed API. */
|
|
11
|
+
export type LicenseObject = {
|
|
12
|
+
/** REQUIRED. The license name used for the API. */
|
|
13
|
+
name?: string;
|
|
14
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
15
|
+
identifier?: string;
|
|
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
|
+
url?: string;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=license.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"license.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.2/strict/license.ts"],"names":[],"mappings":"AAEA,mDAAmD;AACnD,eAAO,MAAM,6BAA6B;IACxC,mDAAmD;;IAEnD,2GAA2G;;IAE3G,8IAA8I;;EAE9I,CAAA;AAEF,mDAAmD;AACnD,MAAM,MAAM,aAAa,GAAG;IAC1B,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2GAA2G;IAC3G,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8IAA8I;IAC9I,GAAG,CAAC,EAAE,MAAM,CAAA;CACb,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
/** The license information for the exposed API. */
|
|
3
|
+
export const LicenseObjectSchemaDefinition = Type.Object({
|
|
4
|
+
/** REQUIRED. The license name used for the API. */
|
|
5
|
+
name: Type.Optional(Type.String()),
|
|
6
|
+
/** An SPDX license expression for the API. The identifier field is mutually exclusive of the url field. */
|
|
7
|
+
identifier: Type.Optional(Type.String()),
|
|
8
|
+
/** 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. */
|
|
9
|
+
url: Type.Optional(Type.String()),
|
|
10
|
+
});
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ServerObject } from './server.js';
|
|
2
|
+
/**
|
|
3
|
+
* The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
|
|
4
|
+
*
|
|
5
|
+
* Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.
|
|
6
|
+
*
|
|
7
|
+
* For computing links and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
|
|
8
|
+
*/
|
|
9
|
+
export declare const LinkObjectSchemaDefinition: import("@scalar/typebox").TObject<{
|
|
10
|
+
/** A URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI Description. */
|
|
11
|
+
operationRef: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
12
|
+
/** The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field. */
|
|
13
|
+
operationId: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
14
|
+
/** A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used (optionally qualified with the parameter location, e.g. path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. */
|
|
15
|
+
parameters: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TAny>>;
|
|
16
|
+
/** A literal value or {expression} to use as a request body when calling the target operation. */
|
|
17
|
+
requestBody: import("@scalar/typebox").TOptional<import("@scalar/typebox").TAny>;
|
|
18
|
+
/** A description of the link. CommonMark syntax MAY be used for rich text representation. */
|
|
19
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
20
|
+
/** A server object to be used by the target operation. */
|
|
21
|
+
server: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"ServerObject">>;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
|
|
25
|
+
*
|
|
26
|
+
* Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.
|
|
27
|
+
*
|
|
28
|
+
* For computing links and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
|
|
29
|
+
*/
|
|
30
|
+
export type LinkObject = {
|
|
31
|
+
/** A URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI Description. */
|
|
32
|
+
operationRef?: string;
|
|
33
|
+
/** The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field. */
|
|
34
|
+
operationId?: string;
|
|
35
|
+
/** A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used (optionally qualified with the parameter location, e.g. path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. */
|
|
36
|
+
parameters?: Record<string, any>;
|
|
37
|
+
/** A literal value or {expression} to use as a request body when calling the target operation. */
|
|
38
|
+
requestBody?: any;
|
|
39
|
+
/** A description of the link. CommonMark syntax MAY be used for rich text representation. */
|
|
40
|
+
description?: string;
|
|
41
|
+
/** A server object to be used by the target operation. */
|
|
42
|
+
server?: ServerObject;
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=link.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.2/strict/link.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B;IACrC,yPAAyP;;IAEzP,2JAA2J;;IAE3J,8WAA8W;;IAE9W,kGAAkG;;IAElG,6FAA6F;;IAE7F,0DAA0D;;EAE1D,CAAA;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG;IACvB,yPAAyP;IACzP,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2JAA2J;IAC3J,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,8WAA8W;IAC9W,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAChC,kGAAkG;IAClG,WAAW,CAAC,EAAE,GAAG,CAAA;IACjB,6FAA6F;IAC7F,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAA;CACtB,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { ServerObjectRef } from '../../../schemas/v3.2/strict/ref-definitions.js';
|
|
3
|
+
/**
|
|
4
|
+
* The Link Object represents a possible design-time link for a response. The presence of a link does not guarantee the caller's ability to successfully invoke it, rather it provides a known relationship and traversal mechanism between responses and other operations.
|
|
5
|
+
*
|
|
6
|
+
* Unlike dynamic links (i.e. links provided in the response payload), the OAS linking mechanism does not require link information in the runtime response.
|
|
7
|
+
*
|
|
8
|
+
* For computing links and providing instructions to execute them, a runtime expression is used for accessing values in an operation and using them as parameters while invoking the linked operation.
|
|
9
|
+
*/
|
|
10
|
+
export const LinkObjectSchemaDefinition = Type.Object({
|
|
11
|
+
/** A URI reference to an OAS operation. This field is mutually exclusive of the operationId field, and MUST point to an Operation Object. Relative operationRef values MAY be used to locate an existing Operation Object in the OpenAPI Description. */
|
|
12
|
+
operationRef: Type.Optional(Type.String()),
|
|
13
|
+
/** The name of an existing, resolvable OAS operation, as defined with a unique operationId. This field is mutually exclusive of the operationRef field. */
|
|
14
|
+
operationId: Type.Optional(Type.String()),
|
|
15
|
+
/** A map representing parameters to pass to an operation as specified with operationId or identified via operationRef. The key is the parameter name to be used (optionally qualified with the parameter location, e.g. path.id for an id parameter in the path), whereas the value can be a constant or an expression to be evaluated and passed to the linked operation. */
|
|
16
|
+
parameters: Type.Optional(Type.Record(Type.String(), Type.Any())),
|
|
17
|
+
/** A literal value or {expression} to use as a request body when calling the target operation. */
|
|
18
|
+
requestBody: Type.Optional(Type.Any()),
|
|
19
|
+
/** A description of the link. CommonMark syntax MAY be used for rich text representation. */
|
|
20
|
+
description: Type.Optional(Type.String()),
|
|
21
|
+
/** A server object to be used by the target operation. */
|
|
22
|
+
server: Type.Optional(ServerObjectRef),
|
|
23
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import type { EncodingObject } from './encoding.js';
|
|
2
|
+
import type { ExampleObject } from './example.js';
|
|
3
|
+
import { type ReferenceType } from './reference.js';
|
|
4
|
+
import type { SchemaObject } from './schema.js';
|
|
5
|
+
/**
|
|
6
|
+
* Each Media Type Object provides schema and examples for the media type identified by its key.
|
|
7
|
+
*
|
|
8
|
+
* When example or examples are provided, the example SHOULD match the specified schema and be in the correct format as specified by the media type and its encoding. The example and examples fields are mutually exclusive, and if either is present it SHALL override any example in the schema. See Working With Examples for further guidance regarding the different ways of specifying examples, including non-JSON/YAML values.
|
|
9
|
+
*/
|
|
10
|
+
export declare const MediaTypeObjectSchemaDefinition: import("@scalar/typebox").TObject<{
|
|
11
|
+
/** A description of the media type, intended to explain the usage of the content. CommonMark syntax MAY be used for rich text representation. Added in OpenAPI 3.2. */
|
|
12
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
13
|
+
/** The schema defining the content of the request, response, parameter, or header. */
|
|
14
|
+
schema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
15
|
+
$ref: import("@scalar/typebox").TString;
|
|
16
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
17
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
18
|
+
}>, import("@scalar/typebox").TObject<{
|
|
19
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
20
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
21
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
22
|
+
'$ref-value': import("@scalar/typebox").TRef<"SchemaObject">;
|
|
23
|
+
}>]>]>>;
|
|
24
|
+
/** A schema describing each item within a sequential media type. Added in OpenAPI 3.2. */
|
|
25
|
+
itemSchema: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"SchemaObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
26
|
+
$ref: import("@scalar/typebox").TString;
|
|
27
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
28
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
29
|
+
}>, import("@scalar/typebox").TObject<{
|
|
30
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
31
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
32
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
33
|
+
'$ref-value': import("@scalar/typebox").TRef<"SchemaObject">;
|
|
34
|
+
}>]>]>>;
|
|
35
|
+
/** Example of the media type */
|
|
36
|
+
example: import("@scalar/typebox").TOptional<import("@scalar/typebox").TAny>;
|
|
37
|
+
/** Examples of the media type */
|
|
38
|
+
examples: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TUnion<[import("@scalar/typebox").TRef<"ExampleObject">, import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TIntersect<[import("@scalar/typebox").TObject<{
|
|
39
|
+
$ref: import("@scalar/typebox").TString;
|
|
40
|
+
summary: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
41
|
+
description: import("@scalar/typebox").TOptional<import("@scalar/typebox").TString>;
|
|
42
|
+
}>, import("@scalar/typebox").TObject<{
|
|
43
|
+
$status: import("@scalar/typebox").TOptional<import("@scalar/typebox").TUnion<[import("@scalar/typebox").TLiteral<"loading">, import("@scalar/typebox").TLiteral<"error">]>>;
|
|
44
|
+
$global: import("@scalar/typebox").TOptional<import("@scalar/typebox").TBoolean>;
|
|
45
|
+
}>]>, import("@scalar/typebox").TObject<{
|
|
46
|
+
'$ref-value': import("@scalar/typebox").TRef<"ExampleObject">;
|
|
47
|
+
}>]>]>>>;
|
|
48
|
+
/** A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding field SHALL only apply to Request Body Objects, and only when the media type is multipart or application/x-www-form-urlencoded. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object. */
|
|
49
|
+
encoding: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRecord<import("@scalar/typebox").TString, import("@scalar/typebox").TRef<"EncodingObject">>>;
|
|
50
|
+
/** An array of positional encoding information, as defined under Encoding By Position. The prefixEncoding field SHALL only apply when the media type is multipart. This field MUST NOT be present if encoding is present. Added in OpenAPI 3.2. */
|
|
51
|
+
prefixEncoding: import("@scalar/typebox").TOptional<import("@scalar/typebox").TArray<import("@scalar/typebox").TRef<"EncodingObject">>>;
|
|
52
|
+
/** A single Encoding Object that provides encoding information for multiple array items, as defined under Encoding By Position. The itemEncoding field SHALL only apply when the media type is multipart. This field MUST NOT be present if encoding is present. Added in OpenAPI 3.2. */
|
|
53
|
+
itemEncoding: import("@scalar/typebox").TOptional<import("@scalar/typebox").TRef<"EncodingObject">>;
|
|
54
|
+
}>;
|
|
55
|
+
/**
|
|
56
|
+
* Each Media Type Object provides schema and examples for the media type identified by its key.
|
|
57
|
+
*
|
|
58
|
+
* When example or examples are provided, the example SHOULD match the specified schema and be in the correct format as specified by the media type and its encoding. The example and examples fields are mutually exclusive, and if either is present it SHALL override any example in the schema. See Working With Examples for further guidance regarding the different ways of specifying examples, including non-JSON/YAML values.
|
|
59
|
+
*/
|
|
60
|
+
export type MediaTypeObject = {
|
|
61
|
+
/** A description of the media type, intended to explain the usage of the content. CommonMark syntax MAY be used for rich text representation. Added in OpenAPI 3.2. */
|
|
62
|
+
description?: string;
|
|
63
|
+
/** The schema defining the content of the request, response, parameter, or header. */
|
|
64
|
+
schema?: ReferenceType<SchemaObject>;
|
|
65
|
+
/** A schema describing each item within a sequential media type. Added in OpenAPI 3.2. */
|
|
66
|
+
itemSchema?: ReferenceType<SchemaObject>;
|
|
67
|
+
/** Example of the media type */
|
|
68
|
+
example?: any;
|
|
69
|
+
/** Examples of the media type */
|
|
70
|
+
examples?: Record<string, ReferenceType<ExampleObject>>;
|
|
71
|
+
/** A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding field SHALL only apply to Request Body Objects, and only when the media type is multipart or application/x-www-form-urlencoded. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object. */
|
|
72
|
+
encoding?: Record<string, EncodingObject>;
|
|
73
|
+
/** An array of positional encoding information, as defined under Encoding By Position. The prefixEncoding field SHALL only apply when the media type is multipart. This field MUST NOT be present if encoding is present. Added in OpenAPI 3.2. */
|
|
74
|
+
prefixEncoding?: EncodingObject[];
|
|
75
|
+
/** A single Encoding Object that provides encoding information for multiple array items, as defined under Encoding By Position. The itemEncoding field SHALL only apply when the media type is multipart. This field MUST NOT be present if encoding is present. Added in OpenAPI 3.2. */
|
|
76
|
+
itemEncoding?: EncodingObject;
|
|
77
|
+
};
|
|
78
|
+
//# sourceMappingURL=media-type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"media-type.d.ts","sourceRoot":"","sources":["../../../../src/schemas/v3.2/strict/media-type.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,WAAW,CAAA;AAE9C,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,aAAa,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C;;;;GAIG;AACH,eAAO,MAAM,+BAA+B;IAC1C,uKAAuK;;IAEvK,sFAAsF;;;;;;;;;;;IAEtF,0FAA0F;;;;;;;;;;;IAE1F,gCAAgC;;IAEhC,iCAAiC;;;;;;;;;;;IAEjC,gaAAga;;IAEha,mPAAmP;;IAEnP,0RAA0R;;EAE1R,CAAA;AAEF;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B,uKAAuK;IACvK,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,sFAAsF;IACtF,MAAM,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IACpC,0FAA0F;IAC1F,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,CAAA;IACxC,gCAAgC;IAChC,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,iCAAiC;IACjC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC,CAAA;IACvD,gaAAga;IACha,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAA;IACzC,mPAAmP;IACnP,cAAc,CAAC,EAAE,cAAc,EAAE,CAAA;IACjC,0RAA0R;IAC1R,YAAY,CAAC,EAAE,cAAc,CAAA;CAC9B,CAAA"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Type } from '@scalar/typebox';
|
|
2
|
+
import { EncodingObjectRef, ExampleObjectRef, SchemaObjectRef } from './ref-definitions.js';
|
|
3
|
+
import { reference } from './reference.js';
|
|
4
|
+
/**
|
|
5
|
+
* Each Media Type Object provides schema and examples for the media type identified by its key.
|
|
6
|
+
*
|
|
7
|
+
* When example or examples are provided, the example SHOULD match the specified schema and be in the correct format as specified by the media type and its encoding. The example and examples fields are mutually exclusive, and if either is present it SHALL override any example in the schema. See Working With Examples for further guidance regarding the different ways of specifying examples, including non-JSON/YAML values.
|
|
8
|
+
*/
|
|
9
|
+
export const MediaTypeObjectSchemaDefinition = Type.Object({
|
|
10
|
+
/** A description of the media type, intended to explain the usage of the content. CommonMark syntax MAY be used for rich text representation. Added in OpenAPI 3.2. */
|
|
11
|
+
description: Type.Optional(Type.String()),
|
|
12
|
+
/** The schema defining the content of the request, response, parameter, or header. */
|
|
13
|
+
schema: Type.Optional(Type.Union([SchemaObjectRef, reference(SchemaObjectRef)])),
|
|
14
|
+
/** A schema describing each item within a sequential media type. Added in OpenAPI 3.2. */
|
|
15
|
+
itemSchema: Type.Optional(Type.Union([SchemaObjectRef, reference(SchemaObjectRef)])),
|
|
16
|
+
/** Example of the media type */
|
|
17
|
+
example: Type.Optional(Type.Any()),
|
|
18
|
+
/** Examples of the media type */
|
|
19
|
+
examples: Type.Optional(Type.Record(Type.String(), Type.Union([ExampleObjectRef, reference(ExampleObjectRef)]))),
|
|
20
|
+
/** A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding field SHALL only apply to Request Body Objects, and only when the media type is multipart or application/x-www-form-urlencoded. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object. */
|
|
21
|
+
encoding: Type.Optional(Type.Record(Type.String(), EncodingObjectRef)),
|
|
22
|
+
/** An array of positional encoding information, as defined under Encoding By Position. The prefixEncoding field SHALL only apply when the media type is multipart. This field MUST NOT be present if encoding is present. Added in OpenAPI 3.2. */
|
|
23
|
+
prefixEncoding: Type.Optional(Type.Array(EncodingObjectRef)),
|
|
24
|
+
/** A single Encoding Object that provides encoding information for multiple array items, as defined under Encoding By Position. The itemEncoding field SHALL only apply when the media type is multipart. This field MUST NOT be present if encoding is present. Added in OpenAPI 3.2. */
|
|
25
|
+
itemEncoding: Type.Optional(EncodingObjectRef),
|
|
26
|
+
});
|