redoc 2.0.0-rc.9 → 2.1.0
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 +920 -10
- package/README.md +244 -187
- package/bundles/756674defce81e90acea.worker.js.LICENSE.txt +68 -0
- package/bundles/756674defce81e90acea.worker.js.map +1 -0
- package/bundles/redoc.browser.lib.js +1820 -0
- package/bundles/redoc.browser.lib.js.LICENSE.txt +6 -0
- package/bundles/redoc.browser.lib.js.map +1 -0
- package/bundles/redoc.lib.js +1744 -13438
- package/bundles/redoc.lib.js.LICENSE.txt +6 -0
- package/bundles/redoc.lib.js.map +1 -1
- package/bundles/redoc.standalone.js +1819 -122
- package/bundles/redoc.standalone.js.LICENSE.txt +95 -0
- package/bundles/redoc.standalone.js.map +1 -1
- package/package.json +131 -112
- package/typings/common-elements/CopyButtonWrapper.d.ts +4 -10
- package/typings/common-elements/Dropdown/Dropdown.d.ts +3 -0
- package/typings/common-elements/Dropdown/index.d.ts +2 -0
- package/typings/common-elements/Dropdown/styled.d.ts +8 -0
- package/typings/common-elements/Dropdown/types.d.ts +24 -0
- package/typings/common-elements/fields.d.ts +7 -2
- package/typings/common-elements/headers.d.ts +1 -1
- package/typings/common-elements/index.d.ts +1 -1
- package/typings/common-elements/linkify.d.ts +4 -8
- package/typings/common-elements/mixins.d.ts +1 -1
- package/typings/common-elements/panels.d.ts +4 -3
- package/typings/common-elements/samples.d.ts +3 -1
- package/typings/common-elements/schema.d.ts +3 -2
- package/typings/common-elements/shelfs.d.ts +2 -6
- package/typings/components/ApiInfo/styled.elements.d.ts +3 -1
- package/typings/components/ApiLogo/styled.elements.d.ts +1 -0
- package/typings/components/CallbackSamples/CallbackReqSamples.d.ts +11 -0
- package/typings/components/CallbackSamples/CallbackSamples.d.ts +13 -0
- package/typings/components/Callbacks/CallbackDetails.d.ts +8 -0
- package/typings/components/Callbacks/CallbackOperation.d.ts +8 -0
- package/typings/components/Callbacks/CallbackTitle.d.ts +10 -0
- package/typings/components/Callbacks/CallbacksList.d.ts +8 -0
- package/typings/components/Callbacks/index.d.ts +3 -0
- package/typings/components/Callbacks/styled.elements.d.ts +3 -0
- package/typings/components/ContentItems/ContentItems.d.ts +2 -2
- package/typings/components/DropdownOrLabel/DropdownOrLabel.d.ts +6 -3
- package/typings/components/Endpoint/Endpoint.d.ts +1 -0
- package/typings/components/Endpoint/styled.elements.d.ts +3 -2
- package/typings/components/ErrorBoundary.d.ts +2 -2
- package/typings/components/Fields/ArrayItemDetails.d.ts +5 -0
- package/typings/components/Fields/EnumValues.d.ts +8 -2
- package/typings/components/Fields/Examples.d.ts +5 -0
- package/typings/components/Fields/Field.d.ts +4 -2
- package/typings/components/Fields/FieldDetail.d.ts +1 -3
- package/typings/components/Fields/FieldDetails.d.ts +2 -3
- package/typings/components/Fields/Pattern.d.ts +5 -0
- package/typings/components/GenericChildrenSwitcher/GenericChildrenSwitcher.d.ts +22 -0
- package/typings/components/JsonViewer/JsonViewer.d.ts +2 -15
- package/typings/components/JsonViewer/style.d.ts +1 -1
- package/typings/components/Loading/Spinner.svg.d.ts +2 -1
- package/typings/components/Markdown/AdvancedMarkdown.d.ts +1 -0
- package/typings/components/Markdown/Markdown.d.ts +2 -1
- package/typings/components/Markdown/SanitizedMdBlock.d.ts +2 -0
- package/typings/components/Markdown/styled.elements.d.ts +1 -1
- package/typings/components/MediaTypeSwitch/MediaTypesSwitch.d.ts +3 -4
- package/typings/components/Operation/Operation.d.ts +4 -6
- package/typings/components/OptionsProvider.d.ts +2 -2
- package/typings/components/Parameters/Parameters.d.ts +7 -1
- package/typings/components/PayloadSamples/Example.d.ts +1 -0
- package/typings/components/PayloadSamples/ExampleValue.d.ts +1 -0
- package/typings/components/PayloadSamples/MediaTypeSamples.d.ts +11 -1
- package/typings/components/PayloadSamples/styled.elements.d.ts +6 -2
- package/typings/components/RedocStandalone.d.ts +2 -11
- package/typings/components/Responses/Response.d.ts +3 -5
- package/typings/components/Responses/ResponseTitle.d.ts +1 -3
- package/typings/components/Responses/ResponsesList.d.ts +1 -0
- package/typings/components/Responses/styled.elements.d.ts +6 -3
- package/typings/components/Schema/DiscriminatorDropdown.d.ts +2 -4
- package/typings/components/Schema/ObjectSchema.d.ts +2 -5
- package/typings/components/Schema/RecursiveSchema.d.ts +3 -0
- package/typings/components/Schema/Schema.d.ts +2 -1
- package/typings/components/SchemaDefinition/SchemaDefinition.d.ts +18 -0
- package/typings/components/SearchBox/SearchBox.d.ts +6 -4
- package/typings/components/SearchBox/styled.elements.d.ts +2 -1
- package/typings/components/SecurityRequirement/OAuthFlow.d.ts +9 -0
- package/typings/components/SecurityRequirement/RequiredScopesRow.d.ts +4 -0
- package/typings/components/SecurityRequirement/SecurityDetails.d.ts +8 -0
- package/typings/components/SecurityRequirement/SecurityHeader.d.ts +8 -0
- package/typings/components/SecurityRequirement/SecurityRequirement.d.ts +2 -10
- package/typings/components/SecurityRequirement/styled.elements.d.ts +17 -0
- package/typings/components/SecuritySchemes/SecuritySchemes.d.ts +7 -9
- package/typings/components/SeeMore/SeeMore.d.ts +7 -0
- package/typings/components/SelectOnClick/SelectOnClick.d.ts +1 -1
- package/typings/components/SideMenu/Logo.d.ts +2 -0
- package/typings/components/SideMenu/MenuItem.d.ts +7 -4
- package/typings/components/SideMenu/MenuItems.d.ts +1 -1
- package/typings/components/SideMenu/SideMenu.d.ts +3 -1
- package/typings/components/SideMenu/styled.elements.d.ts +12 -13
- package/typings/components/SourceCode/SourceCode.d.ts +3 -7
- package/typings/components/StickySidebar/ChevronSvg.d.ts +1 -0
- package/typings/components/StickySidebar/StickyResponsiveSidebar.d.ts +10 -3
- package/typings/components/StoreBuilder.d.ts +7 -18
- package/typings/components/index.d.ts +6 -0
- package/typings/index.d.ts +3 -1
- package/typings/services/AppStore.d.ts +4 -13
- package/typings/services/HistoryService.d.ts +1 -1
- package/typings/services/Labels.d.ts +1 -12
- package/typings/services/MarkdownRenderer.d.ts +7 -16
- package/typings/services/MenuBuilder.d.ts +16 -21
- package/typings/services/MenuStore.d.ts +10 -23
- package/typings/services/OpenAPIParser.d.ts +21 -23
- package/typings/services/RedocNormalizedOptions.d.ts +61 -6
- package/typings/services/ScrollService.d.ts +1 -1
- package/typings/services/SearchStore.d.ts +5 -3
- package/typings/services/SearchWorker.worker.d.ts +5 -9
- package/typings/services/SpecStore.d.ts +6 -4
- package/typings/services/index.d.ts +1 -0
- package/typings/services/models/ApiInfo.d.ts +6 -3
- package/typings/services/models/Callback.d.ts +11 -0
- package/typings/services/models/Example.d.ts +2 -2
- package/typings/services/models/Field.d.ts +12 -6
- package/typings/services/models/Group.model.d.ts +3 -4
- package/typings/services/models/MediaContent.d.ts +6 -7
- package/typings/services/models/MediaType.d.ts +4 -3
- package/typings/services/models/Operation.d.ts +29 -11
- package/typings/services/models/RequestBody.d.ts +12 -5
- package/typings/services/models/Response.d.ts +14 -4
- package/typings/services/models/Schema.d.ts +16 -7
- package/typings/services/models/SecurityRequirement.d.ts +3 -2
- package/typings/services/models/SecuritySchemes.d.ts +3 -2
- package/typings/services/models/Webhook.d.ts +9 -0
- package/typings/services/models/index.d.ts +1 -0
- package/typings/services/types.d.ts +107 -0
- package/typings/styled-components.d.ts +6 -9
- package/typings/styled-patch.d.ts +0 -10
- package/typings/theme.d.ts +32 -6
- package/typings/types/index.d.ts +0 -6
- package/typings/types/index.ts +3 -0
- package/typings/types/open-api.d.ts +251 -213
- package/typings/types/open-api.ts +297 -0
- package/typings/utils/dom.d.ts +1 -0
- package/typings/utils/helpers.d.ts +10 -5
- package/typings/utils/highlight.d.ts +6 -2
- package/typings/utils/index.d.ts +1 -0
- package/typings/utils/jsonToHtml.d.ts +1 -1
- package/typings/utils/openapi.d.ts +23 -14
- package/typings/utils/sort.d.ts +6 -0
- package/bundles/63bafba847dac11ff66b.worker.js.map +0 -1
- package/bundles/ad47ff28a70e23aac7c4.worker.js.map +0 -1
- package/typings/common-elements/dropdown.d.ts +0 -13
- package/typings/types/components.d.ts +0 -5
- /package/typings/components/Fields/{FieldContstraints.d.ts → FieldConstraints.d.ts} +0 -0
package/typings/theme.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export interface ColorSetting {
|
|
|
10
10
|
export interface HTTPResponseColos {
|
|
11
11
|
color: string;
|
|
12
12
|
backgroundColor: string;
|
|
13
|
+
tabTextColor: string;
|
|
13
14
|
}
|
|
14
15
|
export interface FontSettings {
|
|
15
16
|
fontSize: string;
|
|
@@ -18,6 +19,15 @@ export interface FontSettings {
|
|
|
18
19
|
lineHeight: string;
|
|
19
20
|
color: string;
|
|
20
21
|
}
|
|
22
|
+
export interface Servers {
|
|
23
|
+
overlay: {
|
|
24
|
+
backgroundColor: string;
|
|
25
|
+
textColor: string;
|
|
26
|
+
};
|
|
27
|
+
url: {
|
|
28
|
+
backgroundColor: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
21
31
|
export interface ResolvedThemeInterface {
|
|
22
32
|
spacing: {
|
|
23
33
|
unit: number;
|
|
@@ -35,6 +45,10 @@ export interface ResolvedThemeInterface {
|
|
|
35
45
|
success: ColorSetting;
|
|
36
46
|
warning: ColorSetting;
|
|
37
47
|
error: ColorSetting;
|
|
48
|
+
gray: {
|
|
49
|
+
50: string;
|
|
50
|
+
100: string;
|
|
51
|
+
};
|
|
38
52
|
border: {
|
|
39
53
|
light: string;
|
|
40
54
|
dark: string;
|
|
@@ -97,16 +111,23 @@ export interface ResolvedThemeInterface {
|
|
|
97
111
|
color: string;
|
|
98
112
|
visited: string;
|
|
99
113
|
hover: string;
|
|
114
|
+
textDecoration: string;
|
|
115
|
+
hoverTextDecoration: string;
|
|
100
116
|
};
|
|
101
117
|
};
|
|
102
|
-
|
|
118
|
+
sidebar: {
|
|
103
119
|
width: string;
|
|
104
120
|
backgroundColor: string;
|
|
105
121
|
textColor: string;
|
|
122
|
+
activeTextColor: string;
|
|
106
123
|
groupItems: {
|
|
124
|
+
activeBackgroundColor: string;
|
|
125
|
+
activeTextColor: string;
|
|
107
126
|
textTransform: string;
|
|
108
127
|
};
|
|
109
128
|
level1Items: {
|
|
129
|
+
activeBackgroundColor: string;
|
|
130
|
+
activeTextColor: string;
|
|
110
131
|
textTransform: string;
|
|
111
132
|
};
|
|
112
133
|
arrow: {
|
|
@@ -123,15 +144,20 @@ export interface ResolvedThemeInterface {
|
|
|
123
144
|
backgroundColor: string;
|
|
124
145
|
textColor: string;
|
|
125
146
|
width: string;
|
|
147
|
+
servers: Servers;
|
|
148
|
+
};
|
|
149
|
+
codeBlock: {
|
|
150
|
+
backgroundColor: string;
|
|
126
151
|
};
|
|
127
|
-
|
|
152
|
+
fab: {
|
|
128
153
|
backgroundColor: string;
|
|
154
|
+
color: string;
|
|
129
155
|
};
|
|
130
156
|
extensionsHook?: (name: string, props: any) => string;
|
|
131
157
|
}
|
|
132
|
-
export
|
|
133
|
-
export
|
|
134
|
-
export
|
|
158
|
+
export type primitive = string | number | boolean | undefined | null;
|
|
159
|
+
export type AdvancedThemeDeep<T> = T extends primitive ? T | ((theme: ResolvedThemeInterface) => T) : AdvancedThemeObject<T>;
|
|
160
|
+
export type AdvancedThemeObject<T> = {
|
|
135
161
|
[P in keyof T]?: AdvancedThemeDeep<T[P]>;
|
|
136
162
|
};
|
|
137
|
-
export
|
|
163
|
+
export type ThemeInterface = AdvancedThemeObject<ResolvedThemeInterface>;
|
package/typings/types/index.d.ts
CHANGED
|
@@ -1,270 +1,308 @@
|
|
|
1
|
-
import { Omit } from './index';
|
|
2
|
-
|
|
1
|
+
import type { Omit } from './index';
|
|
3
2
|
export interface OpenAPISpec {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
openapi: string;
|
|
4
|
+
info: OpenAPIInfo;
|
|
5
|
+
servers?: OpenAPIServer[];
|
|
6
|
+
paths: OpenAPIPaths;
|
|
7
|
+
components?: OpenAPIComponents;
|
|
8
|
+
security?: OpenAPISecurityRequirement[];
|
|
9
|
+
tags?: OpenAPITag[];
|
|
10
|
+
externalDocs?: OpenAPIExternalDocumentation;
|
|
11
|
+
'x-webhooks'?: OpenAPIPaths;
|
|
12
|
+
webhooks?: OpenAPIPaths;
|
|
12
13
|
}
|
|
13
|
-
|
|
14
14
|
export interface OpenAPIInfo {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
title: string;
|
|
16
|
+
version: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
summary?: string;
|
|
19
|
+
termsOfService?: string;
|
|
20
|
+
contact?: OpenAPIContact;
|
|
21
|
+
license?: OpenAPILicense;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
23
|
export interface OpenAPIServer {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
url: string;
|
|
25
|
+
description?: string;
|
|
26
|
+
variables?: {
|
|
27
|
+
[name: string]: OpenAPIServerVariable;
|
|
28
|
+
};
|
|
28
29
|
}
|
|
29
|
-
|
|
30
30
|
export interface OpenAPIServerVariable {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
enum?: string[];
|
|
32
|
+
default: string;
|
|
33
|
+
description?: string;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
35
|
export interface OpenAPIPaths {
|
|
37
|
-
|
|
36
|
+
[path: string]: OpenAPIPath;
|
|
38
37
|
}
|
|
39
38
|
export interface OpenAPIRef {
|
|
40
|
-
|
|
39
|
+
'x-refsStack'?: string[];
|
|
40
|
+
$ref: string;
|
|
41
|
+
summary?: string;
|
|
42
|
+
description?: string;
|
|
41
43
|
}
|
|
42
|
-
|
|
43
44
|
export type Referenced<T> = OpenAPIRef | T;
|
|
44
|
-
|
|
45
45
|
export interface OpenAPIPath {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
summary?: string;
|
|
47
|
+
description?: string;
|
|
48
|
+
get?: OpenAPIOperation;
|
|
49
|
+
put?: OpenAPIOperation;
|
|
50
|
+
post?: OpenAPIOperation;
|
|
51
|
+
delete?: OpenAPIOperation;
|
|
52
|
+
options?: OpenAPIOperation;
|
|
53
|
+
head?: OpenAPIOperation;
|
|
54
|
+
patch?: OpenAPIOperation;
|
|
55
|
+
trace?: OpenAPIOperation;
|
|
56
|
+
servers?: OpenAPIServer[];
|
|
57
|
+
parameters?: Array<Referenced<OpenAPIParameter>>;
|
|
58
|
+
$ref?: string;
|
|
58
59
|
}
|
|
59
|
-
|
|
60
60
|
export interface OpenAPIXCodeSample {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
61
|
+
lang: string;
|
|
62
|
+
label?: string;
|
|
63
|
+
source: string;
|
|
64
64
|
}
|
|
65
|
-
|
|
66
65
|
export interface OpenAPIOperation {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
66
|
+
tags?: string[];
|
|
67
|
+
summary?: string;
|
|
68
|
+
description?: string;
|
|
69
|
+
externalDocs?: OpenAPIExternalDocumentation;
|
|
70
|
+
operationId?: string;
|
|
71
|
+
parameters?: Array<Referenced<OpenAPIParameter>>;
|
|
72
|
+
requestBody?: Referenced<OpenAPIRequestBody>;
|
|
73
|
+
responses: OpenAPIResponses;
|
|
74
|
+
callbacks?: {
|
|
75
|
+
[name: string]: Referenced<OpenAPICallback>;
|
|
76
|
+
};
|
|
77
|
+
deprecated?: boolean;
|
|
78
|
+
security?: OpenAPISecurityRequirement[];
|
|
79
|
+
servers?: OpenAPIServer[];
|
|
80
|
+
'x-codeSamples'?: OpenAPIXCodeSample[];
|
|
81
|
+
'x-code-samples'?: OpenAPIXCodeSample[];
|
|
80
82
|
}
|
|
81
|
-
|
|
82
83
|
export interface OpenAPIParameter {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
84
|
+
name: string;
|
|
85
|
+
in?: OpenAPIParameterLocation;
|
|
86
|
+
description?: string;
|
|
87
|
+
required?: boolean;
|
|
88
|
+
deprecated?: boolean;
|
|
89
|
+
allowEmptyValue?: boolean;
|
|
90
|
+
style?: OpenAPIParameterStyle;
|
|
91
|
+
explode?: boolean;
|
|
92
|
+
allowReserved?: boolean;
|
|
93
|
+
schema?: Referenced<OpenAPISchema>;
|
|
94
|
+
example?: any;
|
|
95
|
+
examples?: {
|
|
96
|
+
[media: string]: Referenced<OpenAPIExample>;
|
|
97
|
+
};
|
|
98
|
+
content?: {
|
|
99
|
+
[media: string]: OpenAPIMediaType;
|
|
100
|
+
};
|
|
101
|
+
encoding?: Record<string, OpenAPIEncoding>;
|
|
102
|
+
const?: any;
|
|
96
103
|
}
|
|
97
|
-
|
|
98
104
|
export interface OpenAPIExample {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
105
|
+
value: any;
|
|
106
|
+
summary?: string;
|
|
107
|
+
description?: string;
|
|
108
|
+
externalValue?: string;
|
|
103
109
|
}
|
|
104
|
-
|
|
105
110
|
export interface OpenAPISchema {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
111
|
+
$ref?: string;
|
|
112
|
+
type?: string | string[];
|
|
113
|
+
properties?: {
|
|
114
|
+
[name: string]: OpenAPISchema;
|
|
115
|
+
};
|
|
116
|
+
patternProperties?: {
|
|
117
|
+
[name: string]: OpenAPISchema;
|
|
118
|
+
};
|
|
119
|
+
additionalProperties?: boolean | OpenAPISchema;
|
|
120
|
+
unevaluatedProperties?: boolean | OpenAPISchema;
|
|
121
|
+
description?: string;
|
|
122
|
+
default?: any;
|
|
123
|
+
items?: OpenAPISchema | OpenAPISchema[] | boolean;
|
|
124
|
+
required?: string[];
|
|
125
|
+
readOnly?: boolean;
|
|
126
|
+
writeOnly?: boolean;
|
|
127
|
+
deprecated?: boolean;
|
|
128
|
+
format?: string;
|
|
129
|
+
externalDocs?: OpenAPIExternalDocumentation;
|
|
130
|
+
discriminator?: OpenAPIDiscriminator;
|
|
131
|
+
nullable?: boolean;
|
|
132
|
+
oneOf?: OpenAPISchema[];
|
|
133
|
+
anyOf?: OpenAPISchema[];
|
|
134
|
+
allOf?: OpenAPISchema[];
|
|
135
|
+
not?: OpenAPISchema;
|
|
136
|
+
title?: string;
|
|
137
|
+
multipleOf?: number;
|
|
138
|
+
maximum?: number;
|
|
139
|
+
exclusiveMaximum?: boolean | number;
|
|
140
|
+
minimum?: number;
|
|
141
|
+
exclusiveMinimum?: boolean | number;
|
|
142
|
+
maxLength?: number;
|
|
143
|
+
minLength?: number;
|
|
144
|
+
pattern?: string;
|
|
145
|
+
maxItems?: number;
|
|
146
|
+
minItems?: number;
|
|
147
|
+
uniqueItems?: boolean;
|
|
148
|
+
maxProperties?: number;
|
|
149
|
+
minProperties?: number;
|
|
150
|
+
enum?: any[];
|
|
151
|
+
example?: any;
|
|
152
|
+
if?: OpenAPISchema;
|
|
153
|
+
else?: OpenAPISchema;
|
|
154
|
+
then?: OpenAPISchema;
|
|
155
|
+
examples?: any[];
|
|
156
|
+
const?: string;
|
|
157
|
+
contentEncoding?: string;
|
|
158
|
+
contentMediaType?: string;
|
|
159
|
+
prefixItems?: OpenAPISchema[];
|
|
160
|
+
additionalItems?: OpenAPISchema | boolean;
|
|
142
161
|
}
|
|
143
|
-
|
|
144
162
|
export interface OpenAPIDiscriminator {
|
|
145
|
-
|
|
146
|
-
|
|
163
|
+
propertyName: string;
|
|
164
|
+
mapping?: {
|
|
165
|
+
[name: string]: string;
|
|
166
|
+
};
|
|
167
|
+
'x-explicitMappingOnly'?: boolean;
|
|
147
168
|
}
|
|
148
|
-
|
|
149
169
|
export interface OpenAPIMediaType {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
170
|
+
schema?: Referenced<OpenAPISchema>;
|
|
171
|
+
example?: any;
|
|
172
|
+
examples?: {
|
|
173
|
+
[name: string]: Referenced<OpenAPIExample>;
|
|
174
|
+
};
|
|
175
|
+
encoding?: {
|
|
176
|
+
[field: string]: OpenAPIEncoding;
|
|
177
|
+
};
|
|
154
178
|
}
|
|
155
|
-
|
|
156
179
|
export interface OpenAPIEncoding {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
180
|
+
contentType: string;
|
|
181
|
+
headers?: {
|
|
182
|
+
[name: string]: Referenced<OpenAPIHeader>;
|
|
183
|
+
};
|
|
184
|
+
style: OpenAPIParameterStyle;
|
|
185
|
+
explode: boolean;
|
|
186
|
+
allowReserved: boolean;
|
|
162
187
|
}
|
|
163
|
-
|
|
164
188
|
export type OpenAPIParameterLocation = 'query' | 'header' | 'path' | 'cookie';
|
|
165
|
-
export type OpenAPIParameterStyle =
|
|
166
|
-
| 'matrix'
|
|
167
|
-
| 'label'
|
|
168
|
-
| 'form'
|
|
169
|
-
| 'simple'
|
|
170
|
-
| 'spaceDelimited'
|
|
171
|
-
| 'pipeDelimited'
|
|
172
|
-
| 'deepObject';
|
|
173
|
-
|
|
189
|
+
export type OpenAPIParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
|
|
174
190
|
export interface OpenAPIRequestBody {
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
191
|
+
description?: string;
|
|
192
|
+
required?: boolean;
|
|
193
|
+
content: {
|
|
194
|
+
[mime: string]: OpenAPIMediaType;
|
|
195
|
+
};
|
|
196
|
+
'x-examples'?: {
|
|
197
|
+
[mime: string]: {
|
|
198
|
+
[name: string]: Referenced<OpenAPIExample>;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
'x-example'?: {
|
|
202
|
+
[mime: string]: any;
|
|
203
|
+
};
|
|
178
204
|
}
|
|
179
|
-
|
|
180
205
|
export interface OpenAPIResponses {
|
|
181
|
-
|
|
206
|
+
[code: string]: Referenced<OpenAPIResponse>;
|
|
182
207
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
208
|
+
export interface OpenAPIResponse extends Pick<OpenAPIRequestBody, 'description' | 'x-examples' | 'x-example'> {
|
|
209
|
+
headers?: {
|
|
210
|
+
[name: string]: Referenced<OpenAPIHeader>;
|
|
211
|
+
};
|
|
212
|
+
links?: {
|
|
213
|
+
[name: string]: Referenced<OpenAPILink>;
|
|
214
|
+
};
|
|
215
|
+
content?: {
|
|
216
|
+
[mime: string]: OpenAPIMediaType;
|
|
217
|
+
};
|
|
189
218
|
}
|
|
190
|
-
|
|
191
219
|
export interface OpenAPILink {
|
|
192
|
-
|
|
220
|
+
$ref?: string;
|
|
193
221
|
}
|
|
194
|
-
|
|
195
222
|
export type OpenAPIHeader = Omit<OpenAPIParameter, 'in' | 'name'>;
|
|
196
|
-
|
|
197
223
|
export interface OpenAPICallback {
|
|
198
|
-
|
|
224
|
+
[name: string]: OpenAPIPath;
|
|
199
225
|
}
|
|
200
|
-
|
|
201
226
|
export interface OpenAPIComponents {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
227
|
+
schemas?: {
|
|
228
|
+
[name: string]: Referenced<OpenAPISchema>;
|
|
229
|
+
};
|
|
230
|
+
responses?: {
|
|
231
|
+
[name: string]: Referenced<OpenAPIResponse>;
|
|
232
|
+
};
|
|
233
|
+
parameters?: {
|
|
234
|
+
[name: string]: Referenced<OpenAPIParameter>;
|
|
235
|
+
};
|
|
236
|
+
examples?: {
|
|
237
|
+
[name: string]: Referenced<OpenAPIExample>;
|
|
238
|
+
};
|
|
239
|
+
requestBodies?: {
|
|
240
|
+
[name: string]: Referenced<OpenAPIRequestBody>;
|
|
241
|
+
};
|
|
242
|
+
headers?: {
|
|
243
|
+
[name: string]: Referenced<OpenAPIHeader>;
|
|
244
|
+
};
|
|
245
|
+
securitySchemes?: {
|
|
246
|
+
[name: string]: Referenced<OpenAPISecurityScheme>;
|
|
247
|
+
};
|
|
248
|
+
links?: {
|
|
249
|
+
[name: string]: Referenced<OpenAPILink>;
|
|
250
|
+
};
|
|
251
|
+
callbacks?: {
|
|
252
|
+
[name: string]: Referenced<OpenAPICallback>;
|
|
253
|
+
};
|
|
211
254
|
}
|
|
212
|
-
|
|
213
255
|
export interface OpenAPISecurityRequirement {
|
|
214
|
-
|
|
256
|
+
[name: string]: string[];
|
|
215
257
|
}
|
|
216
|
-
|
|
217
258
|
export interface OpenAPISecurityScheme {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
259
|
+
type: 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
|
|
260
|
+
description?: string;
|
|
261
|
+
name?: string;
|
|
262
|
+
in?: 'query' | 'header' | 'cookie';
|
|
263
|
+
scheme?: string;
|
|
264
|
+
bearerFormat: string;
|
|
265
|
+
flows: {
|
|
266
|
+
implicit?: {
|
|
267
|
+
refreshUrl?: string;
|
|
268
|
+
scopes: Record<string, string>;
|
|
269
|
+
authorizationUrl: string;
|
|
270
|
+
};
|
|
271
|
+
password?: {
|
|
272
|
+
refreshUrl?: string;
|
|
273
|
+
scopes: Record<string, string>;
|
|
274
|
+
tokenUrl: string;
|
|
275
|
+
};
|
|
276
|
+
clientCredentials?: {
|
|
277
|
+
refreshUrl?: string;
|
|
278
|
+
scopes: Record<string, string>;
|
|
279
|
+
tokenUrl: string;
|
|
280
|
+
};
|
|
281
|
+
authorizationCode?: {
|
|
282
|
+
refreshUrl?: string;
|
|
283
|
+
scopes: Record<string, string>;
|
|
284
|
+
tokenUrl: string;
|
|
285
|
+
};
|
|
244
286
|
};
|
|
245
|
-
|
|
246
|
-
openIdConnectUrl?: string;
|
|
287
|
+
openIdConnectUrl?: string;
|
|
247
288
|
}
|
|
248
|
-
|
|
249
289
|
export interface OpenAPITag {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
290
|
+
name: string;
|
|
291
|
+
description?: string;
|
|
292
|
+
externalDocs?: OpenAPIExternalDocumentation;
|
|
293
|
+
'x-displayName'?: string;
|
|
254
294
|
}
|
|
255
|
-
|
|
256
295
|
export interface OpenAPIExternalDocumentation {
|
|
257
|
-
|
|
258
|
-
|
|
296
|
+
description?: string;
|
|
297
|
+
url: string;
|
|
259
298
|
}
|
|
260
|
-
|
|
261
299
|
export interface OpenAPIContact {
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
300
|
+
name?: string;
|
|
301
|
+
url?: string;
|
|
302
|
+
email?: string;
|
|
265
303
|
}
|
|
266
|
-
|
|
267
304
|
export interface OpenAPILicense {
|
|
268
|
-
|
|
269
|
-
|
|
305
|
+
name: string;
|
|
306
|
+
url?: string;
|
|
307
|
+
identifier?: string;
|
|
270
308
|
}
|