fumadocs-openapi 10.3.5 → 10.3.7
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/css/generated/shared.css +5 -0
- package/dist/_openapi/types.d.ts +880 -0
- package/dist/index.d.ts +2 -2
- package/dist/playground/client.js +6 -3
- package/dist/playground/components/oauth-dialog.js +19 -7
- package/dist/playground/components/server-select.js +34 -25
- package/dist/requests/media/encode.js +26 -29
- package/dist/server/create.d.ts +2 -2
- package/dist/types.d.ts +18 -13
- package/dist/ui/api-page.d.ts +3 -4
- package/dist/ui/contexts/api.js +4 -3
- package/dist/ui/operation/index.js +31 -21
- package/dist/ui/operation/request-tabs.js +5 -4
- package/dist/utils/pages/preset-auto.js +2 -2
- package/dist/utils/process-document.d.ts +2 -3
- package/dist/utils/process-document.js +3 -2
- package/dist/utils/schema.d.ts +0 -1
- package/dist/utils/schema.js +3 -1
- package/package.json +13 -17
|
@@ -0,0 +1,880 @@
|
|
|
1
|
+
//#region src/_openapi/types.d.ts
|
|
2
|
+
declare namespace OpenAPIV3_2 {
|
|
3
|
+
type Modify<T, R> = Omit<T, keyof R> & R;
|
|
4
|
+
export type PathsWebhooksComponents<T = {}> = {
|
|
5
|
+
paths?: PathsObject<T>;
|
|
6
|
+
webhooks?: Record<string, PathItemObject | ReferenceObject>;
|
|
7
|
+
components?: ComponentsObject;
|
|
8
|
+
};
|
|
9
|
+
export type Document<T = {}> = Modify<Omit<OpenAPIV3_1.Document<T>, 'paths' | 'components' | 'webhooks' | 'tags'>, {
|
|
10
|
+
/**
|
|
11
|
+
* Version of the OpenAPI specification
|
|
12
|
+
* @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions
|
|
13
|
+
*/
|
|
14
|
+
openapi?: '3.2.0';
|
|
15
|
+
swagger?: never;
|
|
16
|
+
servers?: ServerObject[];
|
|
17
|
+
$self?: string;
|
|
18
|
+
tags?: TagObject[];
|
|
19
|
+
} & ((Pick<PathsWebhooksComponents<T>, 'paths'> & Omit<Partial<PathsWebhooksComponents<T>>, 'paths'>) | (Pick<PathsWebhooksComponents<T>, 'webhooks'> & Omit<Partial<PathsWebhooksComponents<T>>, 'webhooks'>) | (Pick<PathsWebhooksComponents<T>, 'components'> & Omit<Partial<PathsWebhooksComponents<T>>, 'components'>)) & T>;
|
|
20
|
+
export type ServerObject = Modify<OpenAPIV3_1.ServerObject, {
|
|
21
|
+
name?: string;
|
|
22
|
+
}>;
|
|
23
|
+
export type PathsObject<T = {}, P extends {} = {}> = Record<string, (PathItemObject<T> & P) | undefined>;
|
|
24
|
+
export type HttpMethods = OpenAPIV3_1.HttpMethods | 'query';
|
|
25
|
+
export type PathItemObject<T = {}> = Modify<OpenAPIV3_1.PathItemObject<T>, { [method in HttpMethods]?: OperationObject<T> }> & {
|
|
26
|
+
additionalOperations?: Record<string, OperationObject<T>>;
|
|
27
|
+
parameters?: (ReferenceObject | ParameterObject)[];
|
|
28
|
+
};
|
|
29
|
+
export type OperationObject<T = {}> = Modify<OpenAPIV3_1.OperationObject<T>, {
|
|
30
|
+
parameters?: (ReferenceObject | ParameterObject)[];
|
|
31
|
+
requestBody?: ReferenceObject | RequestBodyObject;
|
|
32
|
+
responses?: ResponsesObject;
|
|
33
|
+
callbacks?: Record<string, ReferenceObject | CallbackObject>;
|
|
34
|
+
servers?: ServerObject[];
|
|
35
|
+
}> & T;
|
|
36
|
+
export type ParameterStyle = OpenAPIV3_1.ParameterStyle | 'cookie';
|
|
37
|
+
export type ParameterLocation = OpenAPIV3_1.ParameterLocation | 'querystring';
|
|
38
|
+
export type ParameterObject = Modify<OpenAPIV3_1.ParameterObject, {
|
|
39
|
+
style?: ParameterStyle;
|
|
40
|
+
in?: ParameterLocation;
|
|
41
|
+
schema?: ReferenceObject | SchemaObject;
|
|
42
|
+
examples?: {
|
|
43
|
+
[media: string]: ReferenceObject | ExampleObject;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
export type HeaderObject = Modify<OpenAPIV3_1.HeaderObject, {
|
|
47
|
+
content?: {
|
|
48
|
+
[media: string]: ReferenceObject | MediaTypeObject;
|
|
49
|
+
};
|
|
50
|
+
schema?: ReferenceObject | SchemaObject;
|
|
51
|
+
}>;
|
|
52
|
+
export type NonArraySchemaObjectType = OpenAPIV3_1.NonArraySchemaObjectType;
|
|
53
|
+
export type ArraySchemaObjectType = OpenAPIV3_1.ArraySchemaObjectType;
|
|
54
|
+
/**
|
|
55
|
+
* There is no way to tell typescript to require items when type is either 'array' or array containing 'array' type
|
|
56
|
+
* 'items' will be always visible as optional
|
|
57
|
+
* Casting schema object to ArraySchemaObject or NonArraySchemaObject will work fine
|
|
58
|
+
*/
|
|
59
|
+
export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | MixedSchemaObject | boolean;
|
|
60
|
+
export type ArraySchemaObject = {
|
|
61
|
+
type?: ArraySchemaObjectType;
|
|
62
|
+
items?: ReferenceObject | SchemaObject;
|
|
63
|
+
} & BaseSchemaObject;
|
|
64
|
+
export type NonArraySchemaObject = {
|
|
65
|
+
type?: NonArraySchemaObjectType;
|
|
66
|
+
} & BaseSchemaObject;
|
|
67
|
+
type MixedSchemaObject = {
|
|
68
|
+
type?: (ArraySchemaObjectType | NonArraySchemaObjectType)[];
|
|
69
|
+
items?: ReferenceObject | SchemaObject;
|
|
70
|
+
} & BaseSchemaObject;
|
|
71
|
+
export type BaseSchemaObject = Modify<OpenAPIV3_1.BaseSchemaObject, {
|
|
72
|
+
examples?: ExampleObject[];
|
|
73
|
+
discriminator?: DiscriminatorObject;
|
|
74
|
+
xml?: XMLObject;
|
|
75
|
+
}>;
|
|
76
|
+
export type DiscriminatorObject = OpenAPIV3_1.DiscriminatorObject & {
|
|
77
|
+
defaultMapping?: string;
|
|
78
|
+
};
|
|
79
|
+
export type XMLNodeType = 'element' | 'attribute' | 'text' | 'cdata' | 'comment';
|
|
80
|
+
export type XMLObject = Omit<OpenAPIV3_1.XMLObject, 'wrapped' | 'attribute'> & {
|
|
81
|
+
nodeType?: XMLNodeType;
|
|
82
|
+
};
|
|
83
|
+
export type ReferenceObject = OpenAPIV3_1.ReferenceObject;
|
|
84
|
+
export type ExampleObject = OpenAPIV3_1.ExampleObject & {
|
|
85
|
+
dataValue?: any;
|
|
86
|
+
serializedValue?: string;
|
|
87
|
+
};
|
|
88
|
+
export type MediaTypeObject = Modify<OpenAPIV3_1.MediaTypeObject, {
|
|
89
|
+
schema?: ReferenceObject | SchemaObject;
|
|
90
|
+
examples?: Record<string, ReferenceObject | ExampleObject>;
|
|
91
|
+
encoding?: {
|
|
92
|
+
[media: string]: EncodingObject;
|
|
93
|
+
};
|
|
94
|
+
}> & {
|
|
95
|
+
itemSchema?: ReferenceObject | SchemaObject;
|
|
96
|
+
itemEncoding?: EncodingObject;
|
|
97
|
+
prefixEncoding?: EncodingObject[];
|
|
98
|
+
};
|
|
99
|
+
export type EncodingObject = Modify<OpenAPIV3_1.EncodingObject, {
|
|
100
|
+
headers?: {
|
|
101
|
+
[header: string]: ReferenceObject | HeaderObject;
|
|
102
|
+
};
|
|
103
|
+
}> & {
|
|
104
|
+
encoding?: Record<string, EncodingObject>;
|
|
105
|
+
prefixEncoding?: EncodingObject[];
|
|
106
|
+
itemEncoding?: EncodingObject;
|
|
107
|
+
};
|
|
108
|
+
export type RequestBodyObject = Modify<OpenAPIV3_1.RequestBodyObject, {
|
|
109
|
+
content?: {
|
|
110
|
+
[media: string]: ReferenceObject | MediaTypeObject;
|
|
111
|
+
};
|
|
112
|
+
}>;
|
|
113
|
+
export type ResponsesObject = Record<string, ReferenceObject | ResponseObject>;
|
|
114
|
+
export type ResponseObject = Modify<OpenAPIV3_1.ResponseObject, {
|
|
115
|
+
headers?: {
|
|
116
|
+
[header: string]: ReferenceObject | HeaderObject;
|
|
117
|
+
};
|
|
118
|
+
content?: {
|
|
119
|
+
[media: string]: ReferenceObject | MediaTypeObject;
|
|
120
|
+
};
|
|
121
|
+
links?: {
|
|
122
|
+
[link: string]: ReferenceObject | LinkObject;
|
|
123
|
+
};
|
|
124
|
+
}> & {
|
|
125
|
+
summary?: string;
|
|
126
|
+
};
|
|
127
|
+
export type LinkObject = Modify<OpenAPIV3_1.LinkObject, {
|
|
128
|
+
server?: ServerObject;
|
|
129
|
+
}>;
|
|
130
|
+
export type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
|
|
131
|
+
export type ComponentsObject = Modify<OpenAPIV3_1.ComponentsObject, {
|
|
132
|
+
schemas?: Record<string, SchemaObject>;
|
|
133
|
+
responses?: Record<string, ReferenceObject | ResponseObject>;
|
|
134
|
+
parameters?: Record<string, ReferenceObject | ParameterObject>;
|
|
135
|
+
examples?: Record<string, ReferenceObject | ExampleObject>;
|
|
136
|
+
requestBodies?: Record<string, ReferenceObject | RequestBodyObject>;
|
|
137
|
+
headers?: Record<string, ReferenceObject | HeaderObject>;
|
|
138
|
+
securitySchemes?: Record<string, ReferenceObject | SecuritySchemeObject>;
|
|
139
|
+
links?: Record<string, ReferenceObject | LinkObject>;
|
|
140
|
+
callbacks?: Record<string, ReferenceObject | CallbackObject>;
|
|
141
|
+
pathItems?: Record<string, ReferenceObject | PathItemObject>;
|
|
142
|
+
mediaTypes?: Record<string, MediaTypeObject | ReferenceObject>;
|
|
143
|
+
}>;
|
|
144
|
+
export type SecuritySchemeObject = (HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme) & {
|
|
145
|
+
deprecated?: boolean;
|
|
146
|
+
};
|
|
147
|
+
export type HttpSecurityScheme = OpenAPIV3_1.HttpSecurityScheme;
|
|
148
|
+
export type ApiKeySecurityScheme = OpenAPIV3_1.ApiKeySecurityScheme;
|
|
149
|
+
export type OAuthFlows = OpenAPIV3_1.OAuthFlows & {
|
|
150
|
+
deviceAuthorization?: OpenAPIV3.OAuthFlowBase & OpenAPIV3.OAuthFlowTokenUrlTrait & {
|
|
151
|
+
deviceAuthorizationUrl?: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
export type OAuth2SecurityScheme = Modify<OpenAPIV3_1.OAuth2SecurityScheme, {
|
|
155
|
+
flows?: OAuthFlows;
|
|
156
|
+
}>;
|
|
157
|
+
export type OpenIdSecurityScheme = OpenAPIV3_1.OpenIdSecurityScheme;
|
|
158
|
+
export type TagObject = OpenAPIV3_1.TagObject & {
|
|
159
|
+
summary?: string;
|
|
160
|
+
parent?: string;
|
|
161
|
+
kind?: string;
|
|
162
|
+
};
|
|
163
|
+
export {};
|
|
164
|
+
}
|
|
165
|
+
declare namespace OpenAPIV3_1 {
|
|
166
|
+
type Modify<T, R> = Omit<T, keyof R> & R;
|
|
167
|
+
export type PathsWebhooksComponents<T = {}> = {
|
|
168
|
+
paths?: PathsObject<T>;
|
|
169
|
+
webhooks?: Record<string, PathItemObject | ReferenceObject>;
|
|
170
|
+
components?: ComponentsObject;
|
|
171
|
+
};
|
|
172
|
+
export type Document<T = {}> = Modify<Omit<OpenAPIV3.Document<T>, 'paths' | 'components'>, {
|
|
173
|
+
/**
|
|
174
|
+
* Version of the OpenAPI specification
|
|
175
|
+
* @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions
|
|
176
|
+
*/
|
|
177
|
+
openapi?: '3.1.0' | '3.1.1' | '3.1.2';
|
|
178
|
+
swagger?: never;
|
|
179
|
+
info?: InfoObject;
|
|
180
|
+
jsonSchemaDialect?: string;
|
|
181
|
+
servers?: ServerObject[];
|
|
182
|
+
} & ((Pick<PathsWebhooksComponents<T>, 'paths'> & Omit<Partial<PathsWebhooksComponents<T>>, 'paths'>) | (Pick<PathsWebhooksComponents<T>, 'webhooks'> & Omit<Partial<PathsWebhooksComponents<T>>, 'webhooks'>) | (Pick<PathsWebhooksComponents<T>, 'components'> & Omit<Partial<PathsWebhooksComponents<T>>, 'components'>)) & T>;
|
|
183
|
+
export type InfoObject = Modify<OpenAPIV3.InfoObject, {
|
|
184
|
+
summary?: string;
|
|
185
|
+
license?: LicenseObject;
|
|
186
|
+
}>;
|
|
187
|
+
export type ContactObject = OpenAPIV3.ContactObject;
|
|
188
|
+
export type LicenseObject = Modify<OpenAPIV3.LicenseObject, {
|
|
189
|
+
identifier?: string;
|
|
190
|
+
}>;
|
|
191
|
+
export type ServerObject = Modify<OpenAPIV3.ServerObject, {
|
|
192
|
+
url?: string;
|
|
193
|
+
description?: string;
|
|
194
|
+
variables?: Record<string, ServerVariableObject>;
|
|
195
|
+
}>;
|
|
196
|
+
export type ServerVariableObject = Modify<OpenAPIV3.ServerVariableObject, {
|
|
197
|
+
enum?: [string, ...string[]];
|
|
198
|
+
}>;
|
|
199
|
+
export type PathsObject<T = {}, P extends {} = {}> = Record<string, (PathItemObject<T> & P) | undefined>;
|
|
200
|
+
export type HttpMethods = OpenAPIV3.HttpMethods;
|
|
201
|
+
export type PathItemObject<T = {}> = Modify<OpenAPIV3.PathItemObject<T>, {
|
|
202
|
+
servers?: ServerObject[];
|
|
203
|
+
parameters?: (ReferenceObject | ParameterObject)[];
|
|
204
|
+
}> & { [method in HttpMethods]?: OperationObject<T> };
|
|
205
|
+
export type OperationObject<T = {}> = Modify<OpenAPIV3.OperationObject<T>, {
|
|
206
|
+
parameters?: (ReferenceObject | ParameterObject)[];
|
|
207
|
+
requestBody?: ReferenceObject | RequestBodyObject;
|
|
208
|
+
responses?: ResponsesObject;
|
|
209
|
+
callbacks?: Record<string, ReferenceObject | CallbackObject>;
|
|
210
|
+
servers?: ServerObject[];
|
|
211
|
+
}> & T;
|
|
212
|
+
export type ExternalDocumentationObject = OpenAPIV3.ExternalDocumentationObject;
|
|
213
|
+
export type ParameterStyle = OpenAPIV3.ParameterStyle;
|
|
214
|
+
export type ParameterLocation = OpenAPIV3.ParameterLocation;
|
|
215
|
+
export type ParameterObject = OpenAPIV3.ParameterObject;
|
|
216
|
+
export type HeaderObject = Modify<OpenAPIV3.HeaderObject, {
|
|
217
|
+
content?: {
|
|
218
|
+
[media: string]: MediaTypeObject;
|
|
219
|
+
};
|
|
220
|
+
}>;
|
|
221
|
+
export type ParameterBaseObject = Modify<OpenAPIV3.ParameterBaseObject, {
|
|
222
|
+
content?: {
|
|
223
|
+
[media: string]: MediaTypeObject;
|
|
224
|
+
};
|
|
225
|
+
}>;
|
|
226
|
+
export type NonArraySchemaObjectType = OpenAPIV3.NonArraySchemaObjectType | 'null';
|
|
227
|
+
export type ArraySchemaObjectType = OpenAPIV3.ArraySchemaObjectType;
|
|
228
|
+
/**
|
|
229
|
+
* There is no way to tell typescript to require items when type is either 'array' or array containing 'array' type
|
|
230
|
+
* 'items' will be always visible as optional
|
|
231
|
+
* Casting schema object to ArraySchemaObject or NonArraySchemaObject will work fine
|
|
232
|
+
*/
|
|
233
|
+
export type SchemaObject = ArraySchemaObject | NonArraySchemaObject | MixedSchemaObject | boolean;
|
|
234
|
+
export type ArraySchemaObject = {
|
|
235
|
+
type?: ArraySchemaObjectType;
|
|
236
|
+
items?: ReferenceObject | SchemaObject;
|
|
237
|
+
} & BaseSchemaObject;
|
|
238
|
+
export type NonArraySchemaObject = {
|
|
239
|
+
type?: NonArraySchemaObjectType;
|
|
240
|
+
} & BaseSchemaObject;
|
|
241
|
+
type MixedSchemaObject = {
|
|
242
|
+
type?: (ArraySchemaObjectType | NonArraySchemaObjectType)[];
|
|
243
|
+
items?: ReferenceObject | SchemaObject;
|
|
244
|
+
} & BaseSchemaObject;
|
|
245
|
+
export type BaseSchemaObject = Modify<Omit<OpenAPIV3.BaseSchemaObject, 'nullable'>, {
|
|
246
|
+
examples?: OpenAPIV3.BaseSchemaObject['example'][];
|
|
247
|
+
exclusiveMinimum?: number;
|
|
248
|
+
exclusiveMaximum?: number;
|
|
249
|
+
contentMediaType?: string;
|
|
250
|
+
$schema?: string;
|
|
251
|
+
additionalProperties?: boolean | ReferenceObject | SchemaObject;
|
|
252
|
+
properties?: {
|
|
253
|
+
[name: string]: ReferenceObject | SchemaObject;
|
|
254
|
+
};
|
|
255
|
+
patternProperties?: {
|
|
256
|
+
[name: string]: ReferenceObject | SchemaObject;
|
|
257
|
+
};
|
|
258
|
+
allOf?: (ReferenceObject | SchemaObject)[];
|
|
259
|
+
oneOf?: (ReferenceObject | SchemaObject)[];
|
|
260
|
+
anyOf?: (ReferenceObject | SchemaObject)[];
|
|
261
|
+
not?: ReferenceObject | SchemaObject;
|
|
262
|
+
discriminator?: DiscriminatorObject;
|
|
263
|
+
externalDocs?: ExternalDocumentationObject;
|
|
264
|
+
xml?: XMLObject;
|
|
265
|
+
const?: any;
|
|
266
|
+
}>;
|
|
267
|
+
export type DiscriminatorObject = OpenAPIV3.DiscriminatorObject;
|
|
268
|
+
export type XMLObject = OpenAPIV3.XMLObject;
|
|
269
|
+
export type ReferenceObject = Modify<OpenAPIV3.ReferenceObject, {
|
|
270
|
+
summary?: string;
|
|
271
|
+
description?: string;
|
|
272
|
+
}>;
|
|
273
|
+
export type ExampleObject = OpenAPIV3.ExampleObject;
|
|
274
|
+
export type MediaTypeObject = Modify<OpenAPIV3.MediaTypeObject, {
|
|
275
|
+
schema?: SchemaObject | ReferenceObject;
|
|
276
|
+
examples?: Record<string, ReferenceObject | ExampleObject>;
|
|
277
|
+
}>;
|
|
278
|
+
export type EncodingObject = OpenAPIV3.EncodingObject;
|
|
279
|
+
export type RequestBodyObject = Modify<OpenAPIV3.RequestBodyObject, {
|
|
280
|
+
content?: {
|
|
281
|
+
[media: string]: MediaTypeObject;
|
|
282
|
+
};
|
|
283
|
+
}>;
|
|
284
|
+
export type ResponsesObject = Record<string, ReferenceObject | ResponseObject>;
|
|
285
|
+
export type ResponseObject = Modify<OpenAPIV3.ResponseObject, {
|
|
286
|
+
headers?: {
|
|
287
|
+
[header: string]: ReferenceObject | HeaderObject;
|
|
288
|
+
};
|
|
289
|
+
content?: {
|
|
290
|
+
[media: string]: MediaTypeObject;
|
|
291
|
+
};
|
|
292
|
+
links?: {
|
|
293
|
+
[link: string]: ReferenceObject | LinkObject;
|
|
294
|
+
};
|
|
295
|
+
}>;
|
|
296
|
+
export type LinkObject = Modify<OpenAPIV3.LinkObject, {
|
|
297
|
+
server?: ServerObject;
|
|
298
|
+
}>;
|
|
299
|
+
export type CallbackObject = Record<string, PathItemObject | ReferenceObject>;
|
|
300
|
+
export type SecurityRequirementObject = OpenAPIV3.SecurityRequirementObject;
|
|
301
|
+
export type ComponentsObject = Modify<OpenAPIV3.ComponentsObject, {
|
|
302
|
+
schemas?: Record<string, SchemaObject>;
|
|
303
|
+
responses?: Record<string, ReferenceObject | ResponseObject>;
|
|
304
|
+
parameters?: Record<string, ReferenceObject | ParameterObject>;
|
|
305
|
+
examples?: Record<string, ReferenceObject | ExampleObject>;
|
|
306
|
+
requestBodies?: Record<string, ReferenceObject | RequestBodyObject>;
|
|
307
|
+
headers?: Record<string, ReferenceObject | HeaderObject>;
|
|
308
|
+
securitySchemes?: Record<string, ReferenceObject | SecuritySchemeObject>;
|
|
309
|
+
links?: Record<string, ReferenceObject | LinkObject>;
|
|
310
|
+
callbacks?: Record<string, ReferenceObject | CallbackObject>;
|
|
311
|
+
pathItems?: Record<string, ReferenceObject | PathItemObject>;
|
|
312
|
+
}>;
|
|
313
|
+
export type SecuritySchemeObject = OpenAPIV3.SecuritySchemeObject;
|
|
314
|
+
export type HttpSecurityScheme = OpenAPIV3.HttpSecurityScheme;
|
|
315
|
+
export type ApiKeySecurityScheme = OpenAPIV3.ApiKeySecurityScheme;
|
|
316
|
+
export type OAuthFlows = OpenAPIV3.OAuthFlows;
|
|
317
|
+
export type OAuth2SecurityScheme = OpenAPIV3.OAuth2SecurityScheme;
|
|
318
|
+
export type OpenIdSecurityScheme = OpenAPIV3.OpenIdSecurityScheme;
|
|
319
|
+
export type TagObject = OpenAPIV3.TagObject;
|
|
320
|
+
export {};
|
|
321
|
+
}
|
|
322
|
+
declare namespace OpenAPIV3 {
|
|
323
|
+
export type Document<T = {}> = {
|
|
324
|
+
/**
|
|
325
|
+
* Version of the OpenAPI specification
|
|
326
|
+
* @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions
|
|
327
|
+
*/
|
|
328
|
+
openapi?: '3.0.0' | '3.0.1' | '3.0.2' | '3.0.3' | '3.0.4';
|
|
329
|
+
swagger?: never;
|
|
330
|
+
info?: InfoObject;
|
|
331
|
+
servers?: ServerObject[];
|
|
332
|
+
paths?: PathsObject<T>;
|
|
333
|
+
components?: ComponentsObject;
|
|
334
|
+
security?: SecurityRequirementObject[];
|
|
335
|
+
tags?: TagObject[];
|
|
336
|
+
externalDocs?: ExternalDocumentationObject;
|
|
337
|
+
} & T;
|
|
338
|
+
export type InfoObject = {
|
|
339
|
+
title?: string;
|
|
340
|
+
description?: string;
|
|
341
|
+
termsOfService?: string;
|
|
342
|
+
contact?: ContactObject;
|
|
343
|
+
license?: LicenseObject;
|
|
344
|
+
version?: string;
|
|
345
|
+
};
|
|
346
|
+
export type ContactObject = {
|
|
347
|
+
name?: string;
|
|
348
|
+
url?: string;
|
|
349
|
+
email?: string;
|
|
350
|
+
};
|
|
351
|
+
export type LicenseObject = {
|
|
352
|
+
name?: string;
|
|
353
|
+
url?: string;
|
|
354
|
+
};
|
|
355
|
+
export type ServerObject = {
|
|
356
|
+
url?: string;
|
|
357
|
+
description?: string;
|
|
358
|
+
variables?: {
|
|
359
|
+
[variable: string]: ServerVariableObject;
|
|
360
|
+
};
|
|
361
|
+
};
|
|
362
|
+
export type ServerVariableObject = {
|
|
363
|
+
enum?: string[] | number[];
|
|
364
|
+
default?: string | number;
|
|
365
|
+
description?: string;
|
|
366
|
+
};
|
|
367
|
+
export type PathsObject<T = {}, P extends {} = {}> = {
|
|
368
|
+
[pattern: string]: (PathItemObject<T> & P) | undefined;
|
|
369
|
+
};
|
|
370
|
+
export type HttpMethods = OpenAPIV2.HttpMethods | 'trace';
|
|
371
|
+
export type PathItemObject<T = {}> = {
|
|
372
|
+
$ref?: string;
|
|
373
|
+
summary?: string;
|
|
374
|
+
description?: string;
|
|
375
|
+
servers?: ServerObject[];
|
|
376
|
+
parameters?: (ReferenceObject | ParameterObject)[];
|
|
377
|
+
} & { [method in HttpMethods]?: OperationObject<T> } & T;
|
|
378
|
+
export type OperationObject<T = {}> = {
|
|
379
|
+
tags?: string[];
|
|
380
|
+
summary?: string;
|
|
381
|
+
description?: string;
|
|
382
|
+
externalDocs?: ExternalDocumentationObject;
|
|
383
|
+
operationId?: string;
|
|
384
|
+
parameters?: (ReferenceObject | ParameterObject)[];
|
|
385
|
+
requestBody?: ReferenceObject | RequestBodyObject;
|
|
386
|
+
responses?: ResponsesObject;
|
|
387
|
+
callbacks?: {
|
|
388
|
+
[callback: string]: ReferenceObject | CallbackObject;
|
|
389
|
+
};
|
|
390
|
+
deprecated?: boolean;
|
|
391
|
+
security?: SecurityRequirementObject[];
|
|
392
|
+
servers?: ServerObject[];
|
|
393
|
+
} & T;
|
|
394
|
+
export type ExternalDocumentationObject = {
|
|
395
|
+
description?: string;
|
|
396
|
+
url?: string;
|
|
397
|
+
};
|
|
398
|
+
export type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
399
|
+
export type ParameterObject = {
|
|
400
|
+
name?: string;
|
|
401
|
+
in?: ParameterLocation;
|
|
402
|
+
} & ParameterBaseObject;
|
|
403
|
+
export type HeaderObject = {} & ParameterBaseObject;
|
|
404
|
+
export type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
405
|
+
export type ParameterBaseObject = {
|
|
406
|
+
description?: string;
|
|
407
|
+
required?: boolean;
|
|
408
|
+
deprecated?: boolean;
|
|
409
|
+
allowEmptyValue?: boolean;
|
|
410
|
+
style?: ParameterStyle;
|
|
411
|
+
explode?: boolean;
|
|
412
|
+
allowReserved?: boolean;
|
|
413
|
+
schema?: ReferenceObject | SchemaObject;
|
|
414
|
+
example?: any;
|
|
415
|
+
examples?: {
|
|
416
|
+
[media: string]: ReferenceObject | ExampleObject;
|
|
417
|
+
};
|
|
418
|
+
content?: {
|
|
419
|
+
[media: string]: MediaTypeObject;
|
|
420
|
+
};
|
|
421
|
+
};
|
|
422
|
+
export type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer';
|
|
423
|
+
export type ArraySchemaObjectType = 'array';
|
|
424
|
+
export type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
|
|
425
|
+
export type ArraySchemaObject = {
|
|
426
|
+
type?: ArraySchemaObjectType;
|
|
427
|
+
items?: ReferenceObject | SchemaObject;
|
|
428
|
+
} & BaseSchemaObject;
|
|
429
|
+
export type NonArraySchemaObject = {
|
|
430
|
+
type?: NonArraySchemaObjectType;
|
|
431
|
+
} & BaseSchemaObject;
|
|
432
|
+
export type BaseSchemaObject = {
|
|
433
|
+
title?: string;
|
|
434
|
+
description?: string;
|
|
435
|
+
format?: string;
|
|
436
|
+
default?: any;
|
|
437
|
+
multipleOf?: number;
|
|
438
|
+
maximum?: number;
|
|
439
|
+
exclusiveMaximum?: boolean;
|
|
440
|
+
minimum?: number;
|
|
441
|
+
exclusiveMinimum?: boolean;
|
|
442
|
+
maxLength?: number;
|
|
443
|
+
minLength?: number;
|
|
444
|
+
pattern?: string;
|
|
445
|
+
additionalProperties?: boolean | ReferenceObject | SchemaObject;
|
|
446
|
+
maxItems?: number;
|
|
447
|
+
minItems?: number;
|
|
448
|
+
uniqueItems?: boolean;
|
|
449
|
+
maxProperties?: number;
|
|
450
|
+
minProperties?: number;
|
|
451
|
+
required?: string[];
|
|
452
|
+
enum?: any[];
|
|
453
|
+
properties?: {
|
|
454
|
+
[name: string]: ReferenceObject | SchemaObject;
|
|
455
|
+
};
|
|
456
|
+
patternProperties?: {
|
|
457
|
+
[name: string]: ReferenceObject | SchemaObject;
|
|
458
|
+
};
|
|
459
|
+
allOf?: (ReferenceObject | SchemaObject)[];
|
|
460
|
+
oneOf?: (ReferenceObject | SchemaObject)[];
|
|
461
|
+
anyOf?: (ReferenceObject | SchemaObject)[];
|
|
462
|
+
not?: ReferenceObject | SchemaObject;
|
|
463
|
+
nullable?: boolean;
|
|
464
|
+
discriminator?: DiscriminatorObject;
|
|
465
|
+
readOnly?: boolean;
|
|
466
|
+
writeOnly?: boolean;
|
|
467
|
+
xml?: XMLObject;
|
|
468
|
+
externalDocs?: ExternalDocumentationObject;
|
|
469
|
+
example?: any;
|
|
470
|
+
deprecated?: boolean;
|
|
471
|
+
};
|
|
472
|
+
export type DiscriminatorObject = {
|
|
473
|
+
propertyName?: string;
|
|
474
|
+
mapping?: {
|
|
475
|
+
[value: string]: string;
|
|
476
|
+
};
|
|
477
|
+
};
|
|
478
|
+
export type XMLObject = {
|
|
479
|
+
name?: string;
|
|
480
|
+
namespace?: string;
|
|
481
|
+
prefix?: string;
|
|
482
|
+
attribute?: boolean;
|
|
483
|
+
wrapped?: boolean;
|
|
484
|
+
};
|
|
485
|
+
export type ReferenceObject = {
|
|
486
|
+
$ref: string;
|
|
487
|
+
};
|
|
488
|
+
export type ExampleObject = {
|
|
489
|
+
summary?: string;
|
|
490
|
+
description?: string;
|
|
491
|
+
value?: any;
|
|
492
|
+
externalValue?: string;
|
|
493
|
+
};
|
|
494
|
+
export type MediaTypeObject = {
|
|
495
|
+
schema?: ReferenceObject | SchemaObject;
|
|
496
|
+
example?: any;
|
|
497
|
+
examples?: {
|
|
498
|
+
[media: string]: ReferenceObject | ExampleObject;
|
|
499
|
+
};
|
|
500
|
+
encoding?: {
|
|
501
|
+
[media: string]: EncodingObject;
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
export type EncodingObject = {
|
|
505
|
+
contentType?: string;
|
|
506
|
+
headers?: {
|
|
507
|
+
[header: string]: ReferenceObject | HeaderObject;
|
|
508
|
+
};
|
|
509
|
+
style?: string;
|
|
510
|
+
explode?: boolean;
|
|
511
|
+
allowReserved?: boolean;
|
|
512
|
+
};
|
|
513
|
+
export type RequestBodyObject = {
|
|
514
|
+
description?: string;
|
|
515
|
+
content?: {
|
|
516
|
+
[media: string]: MediaTypeObject;
|
|
517
|
+
};
|
|
518
|
+
required?: boolean;
|
|
519
|
+
};
|
|
520
|
+
export type ResponsesObject = {
|
|
521
|
+
[code: string]: ReferenceObject | ResponseObject;
|
|
522
|
+
};
|
|
523
|
+
export type ResponseObject = {
|
|
524
|
+
description?: string;
|
|
525
|
+
headers?: {
|
|
526
|
+
[header: string]: ReferenceObject | HeaderObject;
|
|
527
|
+
};
|
|
528
|
+
content?: {
|
|
529
|
+
[media: string]: MediaTypeObject;
|
|
530
|
+
};
|
|
531
|
+
links?: {
|
|
532
|
+
[link: string]: ReferenceObject | LinkObject;
|
|
533
|
+
};
|
|
534
|
+
};
|
|
535
|
+
export type LinkObject = {
|
|
536
|
+
operationRef?: string;
|
|
537
|
+
operationId?: string;
|
|
538
|
+
parameters?: {
|
|
539
|
+
[parameter: string]: any;
|
|
540
|
+
};
|
|
541
|
+
requestBody?: any;
|
|
542
|
+
description?: string;
|
|
543
|
+
server?: ServerObject;
|
|
544
|
+
};
|
|
545
|
+
export type CallbackObject = {
|
|
546
|
+
[url: string]: PathItemObject;
|
|
547
|
+
};
|
|
548
|
+
export type SecurityRequirementObject = {
|
|
549
|
+
[name: string]: string[];
|
|
550
|
+
};
|
|
551
|
+
export type ComponentsObject = {
|
|
552
|
+
schemas?: {
|
|
553
|
+
[key: string]: ReferenceObject | SchemaObject;
|
|
554
|
+
};
|
|
555
|
+
responses?: {
|
|
556
|
+
[key: string]: ReferenceObject | ResponseObject;
|
|
557
|
+
};
|
|
558
|
+
parameters?: {
|
|
559
|
+
[key: string]: ReferenceObject | ParameterObject;
|
|
560
|
+
};
|
|
561
|
+
examples?: {
|
|
562
|
+
[key: string]: ReferenceObject | ExampleObject;
|
|
563
|
+
};
|
|
564
|
+
requestBodies?: {
|
|
565
|
+
[key: string]: ReferenceObject | RequestBodyObject;
|
|
566
|
+
};
|
|
567
|
+
headers?: {
|
|
568
|
+
[key: string]: ReferenceObject | HeaderObject;
|
|
569
|
+
};
|
|
570
|
+
securitySchemes?: {
|
|
571
|
+
[key: string]: ReferenceObject | SecuritySchemeObject;
|
|
572
|
+
};
|
|
573
|
+
links?: {
|
|
574
|
+
[key: string]: ReferenceObject | LinkObject;
|
|
575
|
+
};
|
|
576
|
+
callbacks?: {
|
|
577
|
+
[key: string]: ReferenceObject | CallbackObject;
|
|
578
|
+
};
|
|
579
|
+
};
|
|
580
|
+
export type SecuritySchemeObject = HttpSecurityScheme | ApiKeySecurityScheme | OAuth2SecurityScheme | OpenIdSecurityScheme;
|
|
581
|
+
export type HttpSecurityScheme = {
|
|
582
|
+
type?: 'http';
|
|
583
|
+
description?: string;
|
|
584
|
+
scheme?: string;
|
|
585
|
+
bearerFormat?: string;
|
|
586
|
+
};
|
|
587
|
+
export type ApiKeySecurityScheme = {
|
|
588
|
+
type?: 'apiKey';
|
|
589
|
+
description?: string;
|
|
590
|
+
name?: string;
|
|
591
|
+
in?: string;
|
|
592
|
+
};
|
|
593
|
+
export type OAuthFlowBase = {
|
|
594
|
+
scopes?: {
|
|
595
|
+
[scope: string]: string;
|
|
596
|
+
};
|
|
597
|
+
refreshUrl?: string;
|
|
598
|
+
};
|
|
599
|
+
type OAuthFlowAuthorizationUrlTrait = {
|
|
600
|
+
authorizationUrl?: string;
|
|
601
|
+
};
|
|
602
|
+
export type OAuthFlowTokenUrlTrait = {
|
|
603
|
+
tokenUrl?: string;
|
|
604
|
+
};
|
|
605
|
+
export type OAuthFlows = {
|
|
606
|
+
implicit?: OAuthFlowBase & OAuthFlowAuthorizationUrlTrait;
|
|
607
|
+
password?: OAuthFlowBase & OAuthFlowTokenUrlTrait;
|
|
608
|
+
clientCredentials?: OAuthFlowBase & OAuthFlowTokenUrlTrait;
|
|
609
|
+
authorizationCode?: OAuthFlowBase & OAuthFlowAuthorizationUrlTrait & OAuthFlowTokenUrlTrait;
|
|
610
|
+
};
|
|
611
|
+
export type OAuth2SecurityScheme = {
|
|
612
|
+
type?: 'oauth2';
|
|
613
|
+
description?: string;
|
|
614
|
+
flows?: OAuthFlows;
|
|
615
|
+
};
|
|
616
|
+
export type OpenIdSecurityScheme = {
|
|
617
|
+
type?: 'openIdConnect';
|
|
618
|
+
description?: string;
|
|
619
|
+
openIdConnectUrl?: string;
|
|
620
|
+
};
|
|
621
|
+
export type TagObject = {
|
|
622
|
+
name?: string;
|
|
623
|
+
description?: string;
|
|
624
|
+
externalDocs?: ExternalDocumentationObject;
|
|
625
|
+
};
|
|
626
|
+
export {};
|
|
627
|
+
}
|
|
628
|
+
declare namespace OpenAPIV2 {
|
|
629
|
+
type Document<T = {}> = {
|
|
630
|
+
/**
|
|
631
|
+
* Version of the OpenAPI specification
|
|
632
|
+
* @see https://github.com/OAI/OpenAPI-Specification/tree/main/versions
|
|
633
|
+
*/
|
|
634
|
+
swagger?: '2.0';
|
|
635
|
+
openapi?: never;
|
|
636
|
+
basePath?: string;
|
|
637
|
+
consumes?: MimeTypes;
|
|
638
|
+
definitions?: DefinitionsObject;
|
|
639
|
+
externalDocs?: ExternalDocumentationObject;
|
|
640
|
+
host?: string;
|
|
641
|
+
info?: InfoObject;
|
|
642
|
+
parameters?: ParametersDefinitionsObject;
|
|
643
|
+
paths?: PathsObject<T>;
|
|
644
|
+
produces?: MimeTypes;
|
|
645
|
+
responses?: ResponsesDefinitionsObject;
|
|
646
|
+
schemes?: string[];
|
|
647
|
+
security?: SecurityRequirementObject[];
|
|
648
|
+
securityDefinitions?: SecurityDefinitionsObject;
|
|
649
|
+
tags?: TagObject[];
|
|
650
|
+
} & T;
|
|
651
|
+
type TagObject = {
|
|
652
|
+
name?: string;
|
|
653
|
+
description?: string;
|
|
654
|
+
externalDocs?: ExternalDocumentationObject;
|
|
655
|
+
};
|
|
656
|
+
type SecuritySchemeObjectBase = {
|
|
657
|
+
type?: 'basic' | 'apiKey' | 'oauth2';
|
|
658
|
+
description?: string;
|
|
659
|
+
};
|
|
660
|
+
type SecuritySchemeBasic = {
|
|
661
|
+
type?: 'basic';
|
|
662
|
+
} & SecuritySchemeObjectBase;
|
|
663
|
+
type SecuritySchemeApiKey = {
|
|
664
|
+
type?: 'apiKey';
|
|
665
|
+
name?: string;
|
|
666
|
+
in?: string;
|
|
667
|
+
} & SecuritySchemeObjectBase;
|
|
668
|
+
type SecuritySchemeOauth2 = SecuritySchemeOauth2Implicit | SecuritySchemeOauth2AccessCode | SecuritySchemeOauth2Password | SecuritySchemeOauth2Application;
|
|
669
|
+
type ScopesObject = {
|
|
670
|
+
[index: string]: any;
|
|
671
|
+
};
|
|
672
|
+
type SecuritySchemeOauth2Base = {
|
|
673
|
+
type?: 'oauth2';
|
|
674
|
+
flow?: 'implicit' | 'password' | 'application' | 'accessCode';
|
|
675
|
+
scopes?: ScopesObject;
|
|
676
|
+
} & SecuritySchemeObjectBase;
|
|
677
|
+
type SecuritySchemeOauth2Implicit = {
|
|
678
|
+
flow?: 'implicit';
|
|
679
|
+
authorizationUrl?: string;
|
|
680
|
+
} & SecuritySchemeOauth2Base;
|
|
681
|
+
type SecuritySchemeOauth2AccessCode = {
|
|
682
|
+
flow?: 'accessCode';
|
|
683
|
+
authorizationUrl?: string;
|
|
684
|
+
tokenUrl?: string;
|
|
685
|
+
} & SecuritySchemeOauth2Base;
|
|
686
|
+
type SecuritySchemeOauth2Password = {
|
|
687
|
+
flow?: 'password';
|
|
688
|
+
tokenUrl?: string;
|
|
689
|
+
} & SecuritySchemeOauth2Base;
|
|
690
|
+
type SecuritySchemeOauth2Application = {
|
|
691
|
+
flow?: 'application';
|
|
692
|
+
tokenUrl?: string;
|
|
693
|
+
} & SecuritySchemeOauth2Base;
|
|
694
|
+
type SecuritySchemeObject = SecuritySchemeBasic | SecuritySchemeApiKey | SecuritySchemeOauth2;
|
|
695
|
+
type SecurityDefinitionsObject = {
|
|
696
|
+
[index: string]: SecuritySchemeObject;
|
|
697
|
+
};
|
|
698
|
+
type SecurityRequirementObject = {
|
|
699
|
+
[index: string]: string[];
|
|
700
|
+
};
|
|
701
|
+
type ReferenceObject = {
|
|
702
|
+
$ref: string;
|
|
703
|
+
};
|
|
704
|
+
type Response = ResponseObject | ReferenceObject;
|
|
705
|
+
type ResponsesDefinitionsObject = {
|
|
706
|
+
[index: string]: ResponseObject;
|
|
707
|
+
};
|
|
708
|
+
type Schema = SchemaObject | ReferenceObject;
|
|
709
|
+
type ResponseObject = {
|
|
710
|
+
description?: string;
|
|
711
|
+
schema?: Schema;
|
|
712
|
+
headers?: HeadersObject;
|
|
713
|
+
examples?: ExampleObject;
|
|
714
|
+
};
|
|
715
|
+
type HeadersObject = {
|
|
716
|
+
[index: string]: HeaderObject;
|
|
717
|
+
};
|
|
718
|
+
type HeaderObject = {
|
|
719
|
+
description?: string;
|
|
720
|
+
} & ItemsObject;
|
|
721
|
+
type ExampleObject = {
|
|
722
|
+
[index: string]: any;
|
|
723
|
+
};
|
|
724
|
+
type OperationObject<T = {}> = {
|
|
725
|
+
tags?: string[];
|
|
726
|
+
summary?: string;
|
|
727
|
+
description?: string;
|
|
728
|
+
externalDocs?: ExternalDocumentationObject;
|
|
729
|
+
operationId?: string;
|
|
730
|
+
consumes?: MimeTypes;
|
|
731
|
+
produces?: MimeTypes;
|
|
732
|
+
parameters?: Parameters;
|
|
733
|
+
responses: ResponsesObject;
|
|
734
|
+
schemes?: string[];
|
|
735
|
+
deprecated?: boolean;
|
|
736
|
+
security?: SecurityRequirementObject[];
|
|
737
|
+
} & T;
|
|
738
|
+
type ResponsesObject = {
|
|
739
|
+
[index: string]: Response | undefined;
|
|
740
|
+
default?: Response;
|
|
741
|
+
};
|
|
742
|
+
type Parameters = (ReferenceObject | Parameter)[];
|
|
743
|
+
type Parameter = InBodyParameterObject | GeneralParameterObject;
|
|
744
|
+
type InBodyParameterObject = {
|
|
745
|
+
schema?: Schema;
|
|
746
|
+
} & ParameterObject;
|
|
747
|
+
type GeneralParameterObject = {
|
|
748
|
+
allowEmptyValue?: boolean;
|
|
749
|
+
} & ParameterObject & ItemsObject;
|
|
750
|
+
type HttpMethods = 'get' | 'put' | 'post' | 'delete' | 'options' | 'head' | 'patch';
|
|
751
|
+
type PathItemObject<T = {}> = {
|
|
752
|
+
$ref?: string;
|
|
753
|
+
parameters?: Parameters;
|
|
754
|
+
} & { [method in HttpMethods]?: OperationObject<T> };
|
|
755
|
+
type PathsObject<T = {}> = {
|
|
756
|
+
[index: string]: PathItemObject<T>;
|
|
757
|
+
};
|
|
758
|
+
type ParametersDefinitionsObject = {
|
|
759
|
+
[index: string]: ParameterObject;
|
|
760
|
+
};
|
|
761
|
+
type ParameterLocation = 'query' | 'header' | 'path' | 'formData' | 'body';
|
|
762
|
+
type ParameterObject = {
|
|
763
|
+
name?: string;
|
|
764
|
+
in?: ParameterLocation;
|
|
765
|
+
description?: string;
|
|
766
|
+
required?: boolean;
|
|
767
|
+
[index: string]: any;
|
|
768
|
+
};
|
|
769
|
+
type MimeTypes = string[];
|
|
770
|
+
type DefinitionsObject = {
|
|
771
|
+
[index: string]: SchemaObject;
|
|
772
|
+
};
|
|
773
|
+
type SchemaObject = {
|
|
774
|
+
[index: string]: any;
|
|
775
|
+
discriminator?: string;
|
|
776
|
+
readOnly?: boolean;
|
|
777
|
+
xml?: XMLObject;
|
|
778
|
+
externalDocs?: ExternalDocumentationObject;
|
|
779
|
+
example?: any;
|
|
780
|
+
default?: any;
|
|
781
|
+
items?: ItemsObject | ReferenceObject;
|
|
782
|
+
properties?: {
|
|
783
|
+
[name: string]: SchemaObject;
|
|
784
|
+
};
|
|
785
|
+
} & IJsonSchema;
|
|
786
|
+
type ExternalDocumentationObject = {
|
|
787
|
+
[index: string]: any;
|
|
788
|
+
description?: string;
|
|
789
|
+
url?: string;
|
|
790
|
+
};
|
|
791
|
+
type ItemsObject = {
|
|
792
|
+
type?: string;
|
|
793
|
+
format?: string;
|
|
794
|
+
items?: ItemsObject | ReferenceObject;
|
|
795
|
+
collectionFormat?: string;
|
|
796
|
+
default?: any;
|
|
797
|
+
maximum?: number;
|
|
798
|
+
exclusiveMaximum?: boolean;
|
|
799
|
+
minimum?: number;
|
|
800
|
+
exclusiveMinimum?: boolean;
|
|
801
|
+
maxLength?: number;
|
|
802
|
+
minLength?: number;
|
|
803
|
+
pattern?: string;
|
|
804
|
+
maxItems?: number;
|
|
805
|
+
minItems?: number;
|
|
806
|
+
uniqueItems?: boolean;
|
|
807
|
+
enum?: any[];
|
|
808
|
+
multipleOf?: number;
|
|
809
|
+
$ref?: string;
|
|
810
|
+
};
|
|
811
|
+
type XMLObject = {
|
|
812
|
+
[index: string]: any;
|
|
813
|
+
name?: string;
|
|
814
|
+
namespace?: string;
|
|
815
|
+
prefix?: string;
|
|
816
|
+
attribute?: boolean;
|
|
817
|
+
wrapped?: boolean;
|
|
818
|
+
};
|
|
819
|
+
type InfoObject = {
|
|
820
|
+
title?: string;
|
|
821
|
+
description?: string;
|
|
822
|
+
termsOfService?: string;
|
|
823
|
+
contact?: ContactObject;
|
|
824
|
+
license?: LicenseObject;
|
|
825
|
+
version?: string;
|
|
826
|
+
};
|
|
827
|
+
type ContactObject = {
|
|
828
|
+
name?: string;
|
|
829
|
+
url?: string;
|
|
830
|
+
email?: string;
|
|
831
|
+
};
|
|
832
|
+
type LicenseObject = {
|
|
833
|
+
name?: string;
|
|
834
|
+
url?: string;
|
|
835
|
+
};
|
|
836
|
+
}
|
|
837
|
+
type IJsonSchema = {
|
|
838
|
+
id?: string;
|
|
839
|
+
$schema?: string;
|
|
840
|
+
title?: string;
|
|
841
|
+
description?: string;
|
|
842
|
+
multipleOf?: number;
|
|
843
|
+
maximum?: number;
|
|
844
|
+
exclusiveMaximum?: boolean;
|
|
845
|
+
minimum?: number;
|
|
846
|
+
exclusiveMinimum?: boolean;
|
|
847
|
+
maxLength?: number;
|
|
848
|
+
minLength?: number;
|
|
849
|
+
pattern?: string;
|
|
850
|
+
additionalItems?: boolean | IJsonSchema;
|
|
851
|
+
items?: IJsonSchema | IJsonSchema[];
|
|
852
|
+
maxItems?: number;
|
|
853
|
+
minItems?: number;
|
|
854
|
+
uniqueItems?: boolean;
|
|
855
|
+
maxProperties?: number;
|
|
856
|
+
minProperties?: number;
|
|
857
|
+
required?: string[];
|
|
858
|
+
additionalProperties?: boolean | IJsonSchema;
|
|
859
|
+
definitions?: {
|
|
860
|
+
[name: string]: IJsonSchema;
|
|
861
|
+
};
|
|
862
|
+
properties?: {
|
|
863
|
+
[name: string]: IJsonSchema;
|
|
864
|
+
};
|
|
865
|
+
patternProperties?: {
|
|
866
|
+
[name: string]: IJsonSchema;
|
|
867
|
+
};
|
|
868
|
+
dependencies?: {
|
|
869
|
+
[name: string]: IJsonSchema | string[];
|
|
870
|
+
};
|
|
871
|
+
enum?: any[];
|
|
872
|
+
type?: string | string[];
|
|
873
|
+
allOf?: IJsonSchema[];
|
|
874
|
+
anyOf?: IJsonSchema[];
|
|
875
|
+
oneOf?: IJsonSchema[];
|
|
876
|
+
not?: IJsonSchema;
|
|
877
|
+
$ref?: string;
|
|
878
|
+
};
|
|
879
|
+
//#endregion
|
|
880
|
+
export { OpenAPIV3, OpenAPIV3_2 };
|