@redocly/config 0.48.0 → 0.48.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/lib/index.d.ts +9 -9
- package/lib/index.js +1 -41
- package/lib/package.json +3 -0
- package/lib/root-config-schema.d.ts +1 -1
- package/lib/types/api-functions-types.d.ts +2 -2
- package/lib/types/asyncapi-types.d.ts +1 -1
- package/lib/types/catalog-entity-types.d.ts +2 -2
- package/lib/types/config-types.d.ts +10 -10
- package/lib/types/graphql-types.d.ts +1 -1
- package/lib/types/index.d.ts +4 -4
- package/lib/types/portal-shared-types.d.ts +4 -4
- package/lib/types/redoc-types.d.ts +1 -1
- package/lib-esm/index.d.ts +9 -9
- package/lib-esm/index.js +1 -10
- package/lib-esm/root-config-schema.d.ts +1 -1
- package/lib-esm/types/api-functions-types.d.ts +2 -2
- package/lib-esm/types/asyncapi-types.d.ts +1 -1
- package/lib-esm/types/catalog-entity-types.d.ts +2 -2
- package/lib-esm/types/config-types.d.ts +10 -10
- package/lib-esm/types/graphql-types.d.ts +1 -1
- package/lib-esm/types/index.d.ts +4 -4
- package/lib-esm/types/portal-shared-types.d.ts +4 -4
- package/lib-esm/types/redoc-types.d.ts +1 -1
- package/package.json +19 -4
- package/lib/asyncapi-config-schema.js +0 -53
- package/lib/common.js +0 -103
- package/lib/constants/config.js +0 -17
- package/lib/constants/entities.js +0 -58
- package/lib/constants/enum.js +0 -6
- package/lib/constants/shared.js +0 -22
- package/lib/default-theme-config-schema.js +0 -57
- package/lib/entities-catalog-config-schema.js +0 -186
- package/lib/entities-catalog-entity-file-schema.js +0 -283
- package/lib/ex-theme-config-schemas.js +0 -687
- package/lib/feedback-config-schema.js +0 -88
- package/lib/graphql-config-schema.js +0 -157
- package/lib/product-override-schema.js +0 -44
- package/lib/redoc-config-schema.js +0 -120
- package/lib/reference-docs-config-schema.js +0 -518
- package/lib/remove-property-recursively.js +0 -28
- package/lib/reunite-config-schema.js +0 -103
- package/lib/root-config-schema.js +0 -588
- package/lib/scorecards-config-schema.js +0 -242
- package/lib/types/api-functions-types.js +0 -3
- package/lib/types/asyncapi-types.js +0 -3
- package/lib/types/catalog-entity-types.js +0 -3
- package/lib/types/code-walkthrough-types.js +0 -3
- package/lib/types/config-types.js +0 -3
- package/lib/types/graphql-types.js +0 -3
- package/lib/types/index.js +0 -21
- package/lib/types/portal-shared-types.js +0 -18
- package/lib/types/redoc-types.js +0 -3
- package/lib-esm/asyncapi-config-schema.js +0 -50
- package/lib-esm/common.js +0 -100
- package/lib-esm/constants/config.js +0 -14
- package/lib-esm/constants/entities.js +0 -55
- package/lib-esm/constants/enum.js +0 -2
- package/lib-esm/constants/shared.js +0 -19
- package/lib-esm/default-theme-config-schema.js +0 -54
- package/lib-esm/entities-catalog-config-schema.js +0 -183
- package/lib-esm/entities-catalog-entity-file-schema.js +0 -280
- package/lib-esm/ex-theme-config-schemas.js +0 -684
- package/lib-esm/feedback-config-schema.js +0 -85
- package/lib-esm/graphql-config-schema.js +0 -154
- package/lib-esm/product-override-schema.js +0 -41
- package/lib-esm/redoc-config-schema.js +0 -117
- package/lib-esm/reference-docs-config-schema.js +0 -515
- package/lib-esm/remove-property-recursively.js +0 -25
- package/lib-esm/reunite-config-schema.js +0 -100
- package/lib-esm/root-config-schema.js +0 -585
- package/lib-esm/scorecards-config-schema.js +0 -239
- package/lib-esm/types/api-functions-types.js +0 -2
- package/lib-esm/types/asyncapi-types.js +0 -2
- package/lib-esm/types/catalog-entity-types.js +0 -2
- package/lib-esm/types/code-walkthrough-types.js +0 -2
- package/lib-esm/types/config-types.js +0 -2
- package/lib-esm/types/graphql-types.js +0 -2
- package/lib-esm/types/index.js +0 -5
- package/lib-esm/types/portal-shared-types.js +0 -2
- package/lib-esm/types/redoc-types.js +0 -2
|
@@ -1,518 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// Needed for supporting deprecated Reference Docs config options
|
|
3
|
-
// Transferred from https://github.com/Redocly/redocly-cli/blob/main/packages/core/src/types/redocly-yaml.ts
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.deprecatedRefDocsSchema = void 0;
|
|
6
|
-
const ConfigLanguage = {
|
|
7
|
-
type: 'object',
|
|
8
|
-
properties: {
|
|
9
|
-
label: { type: 'string' },
|
|
10
|
-
lang: {
|
|
11
|
-
enum: [
|
|
12
|
-
'curl',
|
|
13
|
-
'C#',
|
|
14
|
-
'Go',
|
|
15
|
-
'Java',
|
|
16
|
-
'Java8+Apache',
|
|
17
|
-
'JavaScript',
|
|
18
|
-
'Node.js',
|
|
19
|
-
'PHP',
|
|
20
|
-
'Python',
|
|
21
|
-
'R',
|
|
22
|
-
'Ruby',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
required: ['lang'],
|
|
27
|
-
};
|
|
28
|
-
const ConfigLabels = {
|
|
29
|
-
type: 'object',
|
|
30
|
-
properties: {
|
|
31
|
-
enum: { type: 'string' },
|
|
32
|
-
enumSingleValue: { type: 'string' },
|
|
33
|
-
enumArray: { type: 'string' },
|
|
34
|
-
default: { type: 'string' },
|
|
35
|
-
deprecated: { type: 'string' },
|
|
36
|
-
example: { type: 'string' },
|
|
37
|
-
examples: { type: 'string' },
|
|
38
|
-
nullable: { type: 'string' },
|
|
39
|
-
recursive: { type: 'string' },
|
|
40
|
-
arrayOf: { type: 'string' },
|
|
41
|
-
webhook: { type: 'string' },
|
|
42
|
-
authorizations: { type: 'string' },
|
|
43
|
-
tryItAuthBasicUsername: { type: 'string' },
|
|
44
|
-
tryItAuthBasicPassword: { type: 'string' },
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
const CommonConfigSidebarLinks = {
|
|
48
|
-
type: 'object',
|
|
49
|
-
properties: {
|
|
50
|
-
label: { type: 'string' },
|
|
51
|
-
link: { type: 'string' },
|
|
52
|
-
target: { type: 'string' },
|
|
53
|
-
},
|
|
54
|
-
required: ['label', 'link'],
|
|
55
|
-
};
|
|
56
|
-
const ConfigSidebarLinks = {
|
|
57
|
-
type: 'object',
|
|
58
|
-
properties: {
|
|
59
|
-
beforeInfo: { type: 'array', items: CommonConfigSidebarLinks },
|
|
60
|
-
end: { type: 'array', items: CommonConfigSidebarLinks },
|
|
61
|
-
},
|
|
62
|
-
};
|
|
63
|
-
const CommonThemeColors = {
|
|
64
|
-
type: 'object',
|
|
65
|
-
properties: {
|
|
66
|
-
main: { type: 'string' },
|
|
67
|
-
light: { type: 'string' },
|
|
68
|
-
dark: { type: 'string' },
|
|
69
|
-
contrastText: { type: 'string' },
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
const CommonColorProps = {
|
|
73
|
-
type: 'object',
|
|
74
|
-
properties: {
|
|
75
|
-
backgroundColor: { type: 'string' },
|
|
76
|
-
borderColor: { type: 'string' },
|
|
77
|
-
color: { type: 'string' },
|
|
78
|
-
tabTextColor: { type: 'string' },
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
const BorderThemeColors = {
|
|
82
|
-
type: 'object',
|
|
83
|
-
properties: pickObjectProps(CommonThemeColors.properties, ['light', 'dark']),
|
|
84
|
-
};
|
|
85
|
-
const HttpColors = {
|
|
86
|
-
type: 'object',
|
|
87
|
-
properties: {
|
|
88
|
-
basic: { type: 'string' },
|
|
89
|
-
delete: { type: 'string' },
|
|
90
|
-
get: { type: 'string' },
|
|
91
|
-
head: { type: 'string' },
|
|
92
|
-
link: { type: 'string' },
|
|
93
|
-
options: { type: 'string' },
|
|
94
|
-
patch: { type: 'string' },
|
|
95
|
-
post: { type: 'string' },
|
|
96
|
-
put: { type: 'string' },
|
|
97
|
-
},
|
|
98
|
-
};
|
|
99
|
-
const ResponseColors = {
|
|
100
|
-
type: 'object',
|
|
101
|
-
properties: {
|
|
102
|
-
error: CommonColorProps,
|
|
103
|
-
info: CommonColorProps,
|
|
104
|
-
redirect: CommonColorProps,
|
|
105
|
-
success: CommonColorProps,
|
|
106
|
-
},
|
|
107
|
-
};
|
|
108
|
-
const SecondaryColors = {
|
|
109
|
-
type: 'object',
|
|
110
|
-
properties: omitObjectProps(CommonThemeColors.properties, ['dark']),
|
|
111
|
-
};
|
|
112
|
-
const TextThemeColors = {
|
|
113
|
-
type: 'object',
|
|
114
|
-
properties: {
|
|
115
|
-
primary: { type: 'string' },
|
|
116
|
-
secondary: { type: 'string' },
|
|
117
|
-
light: { type: 'string' },
|
|
118
|
-
},
|
|
119
|
-
};
|
|
120
|
-
const ThemeColors = {
|
|
121
|
-
type: 'object',
|
|
122
|
-
properties: {
|
|
123
|
-
accent: CommonThemeColors,
|
|
124
|
-
border: BorderThemeColors,
|
|
125
|
-
error: CommonThemeColors,
|
|
126
|
-
http: HttpColors,
|
|
127
|
-
primary: CommonThemeColors,
|
|
128
|
-
responses: ResponseColors,
|
|
129
|
-
secondary: SecondaryColors,
|
|
130
|
-
success: CommonThemeColors,
|
|
131
|
-
text: TextThemeColors,
|
|
132
|
-
tonalOffset: { type: 'number' },
|
|
133
|
-
warning: CommonThemeColors,
|
|
134
|
-
},
|
|
135
|
-
};
|
|
136
|
-
const SizeProps = {
|
|
137
|
-
type: 'object',
|
|
138
|
-
properties: {
|
|
139
|
-
fontSize: { type: 'string' },
|
|
140
|
-
padding: { type: 'string' },
|
|
141
|
-
minWidth: { type: 'string' },
|
|
142
|
-
},
|
|
143
|
-
};
|
|
144
|
-
const Sizes = {
|
|
145
|
-
type: 'object',
|
|
146
|
-
properties: {
|
|
147
|
-
small: SizeProps,
|
|
148
|
-
medium: SizeProps,
|
|
149
|
-
large: SizeProps,
|
|
150
|
-
xlarge: SizeProps,
|
|
151
|
-
},
|
|
152
|
-
};
|
|
153
|
-
const FontConfig = {
|
|
154
|
-
type: 'object',
|
|
155
|
-
properties: {
|
|
156
|
-
fontFamily: { type: 'string' },
|
|
157
|
-
fontSize: { type: 'string' },
|
|
158
|
-
fontWeight: { type: 'string' },
|
|
159
|
-
lineHeight: { type: 'string' },
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
const ButtonsConfig = {
|
|
163
|
-
type: 'object',
|
|
164
|
-
properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, hoverStyle: { type: 'string' }, boxShadow: { type: 'string' }, hoverBoxShadow: { type: 'string' }, sizes: Sizes }),
|
|
165
|
-
};
|
|
166
|
-
const BadgeFontConfig = {
|
|
167
|
-
type: 'object',
|
|
168
|
-
properties: pickObjectProps(FontConfig.properties, ['fontSize', 'lineHeight']),
|
|
169
|
-
};
|
|
170
|
-
const BadgeSizes = {
|
|
171
|
-
type: 'object',
|
|
172
|
-
properties: {
|
|
173
|
-
medium: BadgeFontConfig,
|
|
174
|
-
small: BadgeFontConfig,
|
|
175
|
-
},
|
|
176
|
-
};
|
|
177
|
-
const HttpBadgesConfig = {
|
|
178
|
-
type: 'object',
|
|
179
|
-
properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontSize', 'lineHeight'])), { borderRadius: { type: 'string' }, color: { type: 'string' }, sizes: BadgeSizes }),
|
|
180
|
-
};
|
|
181
|
-
const LabelControls = {
|
|
182
|
-
type: 'object',
|
|
183
|
-
properties: {
|
|
184
|
-
top: { type: 'string' },
|
|
185
|
-
width: { type: 'string' },
|
|
186
|
-
height: { type: 'string' },
|
|
187
|
-
},
|
|
188
|
-
};
|
|
189
|
-
const Panels = {
|
|
190
|
-
type: 'object',
|
|
191
|
-
properties: {
|
|
192
|
-
borderRadius: { type: 'string' },
|
|
193
|
-
backgroundColor: { type: 'string' },
|
|
194
|
-
},
|
|
195
|
-
};
|
|
196
|
-
const TryItButton = {
|
|
197
|
-
type: 'object',
|
|
198
|
-
properties: {
|
|
199
|
-
fullWidth: { type: 'boolean' },
|
|
200
|
-
},
|
|
201
|
-
};
|
|
202
|
-
const ConfigThemeComponents = {
|
|
203
|
-
type: 'object',
|
|
204
|
-
properties: {
|
|
205
|
-
buttons: ButtonsConfig,
|
|
206
|
-
httpBadges: HttpBadgesConfig,
|
|
207
|
-
layoutControls: LabelControls,
|
|
208
|
-
panels: Panels,
|
|
209
|
-
tryItButton: TryItButton,
|
|
210
|
-
tryItSendButton: TryItButton,
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
const Breakpoints = {
|
|
214
|
-
type: 'object',
|
|
215
|
-
properties: {
|
|
216
|
-
small: { type: 'string' },
|
|
217
|
-
medium: { type: 'string' },
|
|
218
|
-
large: { type: 'string' },
|
|
219
|
-
},
|
|
220
|
-
};
|
|
221
|
-
const StackedConfig = {
|
|
222
|
-
type: 'object',
|
|
223
|
-
properties: {
|
|
224
|
-
maxWidth: Breakpoints,
|
|
225
|
-
},
|
|
226
|
-
};
|
|
227
|
-
const ThreePanelConfig = {
|
|
228
|
-
type: 'object',
|
|
229
|
-
properties: {
|
|
230
|
-
maxWidth: Breakpoints,
|
|
231
|
-
middlePanelMaxWidth: Breakpoints,
|
|
232
|
-
},
|
|
233
|
-
};
|
|
234
|
-
const Layout = {
|
|
235
|
-
type: 'object',
|
|
236
|
-
properties: {
|
|
237
|
-
showDarkRightPanel: { type: 'boolean' },
|
|
238
|
-
stacked: StackedConfig,
|
|
239
|
-
'three-panel': ThreePanelConfig,
|
|
240
|
-
},
|
|
241
|
-
};
|
|
242
|
-
const SchemaColorsConfig = {
|
|
243
|
-
type: 'object',
|
|
244
|
-
properties: {
|
|
245
|
-
backgroundColor: { type: 'string' },
|
|
246
|
-
border: { type: 'string' },
|
|
247
|
-
},
|
|
248
|
-
};
|
|
249
|
-
const ConfigThemeSchema = {
|
|
250
|
-
type: 'object',
|
|
251
|
-
properties: {
|
|
252
|
-
breakFieldNames: { type: 'boolean' },
|
|
253
|
-
caretColor: { type: 'string' },
|
|
254
|
-
caretSize: { type: 'string' },
|
|
255
|
-
constraints: SchemaColorsConfig,
|
|
256
|
-
defaultDetailsWidth: { type: 'string' },
|
|
257
|
-
examples: SchemaColorsConfig,
|
|
258
|
-
labelsTextSize: { type: 'string' },
|
|
259
|
-
linesColor: { type: 'string' },
|
|
260
|
-
nestedBackground: { type: 'string' },
|
|
261
|
-
nestingSpacing: { type: 'string' },
|
|
262
|
-
requireLabelColor: { type: 'string' },
|
|
263
|
-
typeNameColor: { type: 'string' },
|
|
264
|
-
typeTitleColor: { type: 'string' },
|
|
265
|
-
},
|
|
266
|
-
};
|
|
267
|
-
const GroupItemsConfig = {
|
|
268
|
-
type: 'object',
|
|
269
|
-
properties: {
|
|
270
|
-
subItemsColor: { type: 'string' },
|
|
271
|
-
textTransform: { type: 'string' },
|
|
272
|
-
fontWeight: { type: 'string' },
|
|
273
|
-
},
|
|
274
|
-
};
|
|
275
|
-
const Level1Items = {
|
|
276
|
-
type: 'object',
|
|
277
|
-
properties: pickObjectProps(GroupItemsConfig.properties, ['textTransform']),
|
|
278
|
-
};
|
|
279
|
-
const SpacingConfig = {
|
|
280
|
-
type: 'object',
|
|
281
|
-
properties: {
|
|
282
|
-
unit: { type: 'number' },
|
|
283
|
-
paddingHorizontal: { type: 'string' },
|
|
284
|
-
paddingVertical: { type: 'string' },
|
|
285
|
-
offsetTop: { type: 'string' },
|
|
286
|
-
offsetLeft: { type: 'string' },
|
|
287
|
-
offsetNesting: { type: 'string' },
|
|
288
|
-
},
|
|
289
|
-
};
|
|
290
|
-
const Sidebar = {
|
|
291
|
-
type: 'object',
|
|
292
|
-
properties: Object.assign(Object.assign({}, omitObjectProps(FontConfig.properties, ['fontWeight', 'lineHeight'])), { activeBgColor: { type: 'string' }, activeTextColor: { type: 'string' }, backgroundColor: { type: 'string' }, borderRadius: { type: 'string' }, breakPath: { type: 'boolean' }, caretColor: { type: 'string' }, caretSize: { type: 'string' }, groupItems: GroupItemsConfig, level1items: Level1Items, rightLineColor: { type: 'string' }, separatorLabelColor: { type: 'string' }, showAtBreakpoint: { type: 'string' }, spacing: SpacingConfig, textColor: { type: 'string' }, width: { type: 'string' } }),
|
|
293
|
-
};
|
|
294
|
-
const Heading = {
|
|
295
|
-
type: 'object',
|
|
296
|
-
properties: Object.assign(Object.assign({}, FontConfig.properties), { color: { type: 'string' }, transform: { type: 'string' } }),
|
|
297
|
-
};
|
|
298
|
-
const CodeConfig = {
|
|
299
|
-
type: 'object',
|
|
300
|
-
properties: Object.assign(Object.assign({}, FontConfig.properties), { backgroundColor: { type: 'string' }, color: { type: 'string' }, wordBreak: {
|
|
301
|
-
type: 'string',
|
|
302
|
-
enum: [
|
|
303
|
-
'break-all',
|
|
304
|
-
'break-word',
|
|
305
|
-
'keep-all',
|
|
306
|
-
'normal',
|
|
307
|
-
'revert',
|
|
308
|
-
'unset',
|
|
309
|
-
'inherit',
|
|
310
|
-
'initial',
|
|
311
|
-
],
|
|
312
|
-
}, wrap: { type: 'boolean' } }),
|
|
313
|
-
};
|
|
314
|
-
const HeadingsConfig = {
|
|
315
|
-
type: 'object',
|
|
316
|
-
properties: omitObjectProps(FontConfig.properties, ['fontSize']),
|
|
317
|
-
};
|
|
318
|
-
const LinksConfig = {
|
|
319
|
-
type: 'object',
|
|
320
|
-
properties: {
|
|
321
|
-
color: { type: 'string' },
|
|
322
|
-
hover: { type: 'string' },
|
|
323
|
-
textDecoration: { type: 'string' },
|
|
324
|
-
hoverTextDecoration: { type: 'string' },
|
|
325
|
-
visited: { type: 'string' },
|
|
326
|
-
},
|
|
327
|
-
};
|
|
328
|
-
const Typography = {
|
|
329
|
-
type: 'object',
|
|
330
|
-
properties: Object.assign(Object.assign({ code: CodeConfig, fieldName: FontConfig }, pickObjectProps(FontConfig.properties, ['fontSize', 'fontFamily'])), { fontWeightBold: { type: 'string' }, fontWeightLight: { type: 'string' }, fontWeightRegular: { type: 'string' }, heading1: Heading, heading2: Heading, heading3: Heading, headings: HeadingsConfig, lineHeight: { type: 'string' }, links: LinksConfig, optimizeSpeed: { type: 'boolean' }, rightPanelHeading: Heading, smoothing: {
|
|
331
|
-
type: 'string',
|
|
332
|
-
enum: ['auto', 'none', 'antialiased', 'subpixel-antialiased', 'grayscale'],
|
|
333
|
-
} }),
|
|
334
|
-
};
|
|
335
|
-
const TokenProps = {
|
|
336
|
-
type: 'object',
|
|
337
|
-
properties: Object.assign({ color: { type: 'string' } }, omitObjectProps(FontConfig.properties, ['fontWeight'])),
|
|
338
|
-
};
|
|
339
|
-
const CodeBlock = {
|
|
340
|
-
type: 'object',
|
|
341
|
-
properties: {
|
|
342
|
-
backgroundColor: { type: 'string' },
|
|
343
|
-
borderRadius: { type: 'string' },
|
|
344
|
-
tokens: TokenProps,
|
|
345
|
-
},
|
|
346
|
-
};
|
|
347
|
-
const ConfigThemeLogo = {
|
|
348
|
-
type: 'object',
|
|
349
|
-
properties: {
|
|
350
|
-
gutter: { type: 'string' },
|
|
351
|
-
maxHeight: { type: 'string' },
|
|
352
|
-
maxWidth: { type: 'string' },
|
|
353
|
-
},
|
|
354
|
-
};
|
|
355
|
-
const Fab = {
|
|
356
|
-
type: 'object',
|
|
357
|
-
properties: {
|
|
358
|
-
backgroundColor: { type: 'string' },
|
|
359
|
-
color: { type: 'string' },
|
|
360
|
-
},
|
|
361
|
-
};
|
|
362
|
-
const ButtonOverrides = {
|
|
363
|
-
type: 'object',
|
|
364
|
-
properties: {
|
|
365
|
-
custom: { type: 'string' },
|
|
366
|
-
},
|
|
367
|
-
};
|
|
368
|
-
const Overrides = {
|
|
369
|
-
type: 'object',
|
|
370
|
-
properties: {
|
|
371
|
-
DownloadButton: ButtonOverrides,
|
|
372
|
-
NextSectionButton: ButtonOverrides,
|
|
373
|
-
},
|
|
374
|
-
};
|
|
375
|
-
const RightPanel = {
|
|
376
|
-
type: 'object',
|
|
377
|
-
properties: {
|
|
378
|
-
backgroundColor: { type: 'string' },
|
|
379
|
-
panelBackgroundColor: { type: 'string' },
|
|
380
|
-
panelControlsBackgroundColor: { type: 'string' },
|
|
381
|
-
showAtBreakpoint: { type: 'string' },
|
|
382
|
-
textColor: { type: 'string' },
|
|
383
|
-
width: { type: 'string' },
|
|
384
|
-
},
|
|
385
|
-
};
|
|
386
|
-
const Shape = {
|
|
387
|
-
type: 'object',
|
|
388
|
-
properties: { borderRadius: { type: 'string' } },
|
|
389
|
-
};
|
|
390
|
-
const ThemeSpacing = {
|
|
391
|
-
type: 'object',
|
|
392
|
-
properties: {
|
|
393
|
-
sectionHorizontal: { type: 'number' },
|
|
394
|
-
sectionVertical: { type: 'number' },
|
|
395
|
-
unit: { type: 'number' },
|
|
396
|
-
},
|
|
397
|
-
};
|
|
398
|
-
const ConfigTheme = {
|
|
399
|
-
type: 'object',
|
|
400
|
-
properties: {
|
|
401
|
-
breakpoints: Breakpoints,
|
|
402
|
-
codeBlock: CodeBlock,
|
|
403
|
-
colors: ThemeColors,
|
|
404
|
-
components: ConfigThemeComponents,
|
|
405
|
-
layout: Layout,
|
|
406
|
-
logo: ConfigThemeLogo,
|
|
407
|
-
fab: Fab,
|
|
408
|
-
overrides: Overrides,
|
|
409
|
-
rightPanel: RightPanel,
|
|
410
|
-
schema: ConfigThemeSchema,
|
|
411
|
-
shape: Shape,
|
|
412
|
-
sidebar: Sidebar,
|
|
413
|
-
spacing: ThemeSpacing,
|
|
414
|
-
typography: Typography,
|
|
415
|
-
links: { properties: { color: { type: 'string' } } },
|
|
416
|
-
codeSample: { properties: { backgroundColor: { type: 'string' } } },
|
|
417
|
-
},
|
|
418
|
-
};
|
|
419
|
-
const GenerateCodeSamples = {
|
|
420
|
-
type: 'object',
|
|
421
|
-
properties: {
|
|
422
|
-
skipOptionalParameters: { type: 'boolean' },
|
|
423
|
-
languages: { type: 'array', items: ConfigLanguage },
|
|
424
|
-
},
|
|
425
|
-
required: ['languages'],
|
|
426
|
-
};
|
|
427
|
-
exports.deprecatedRefDocsSchema = {
|
|
428
|
-
type: 'object',
|
|
429
|
-
properties: {
|
|
430
|
-
theme: ConfigTheme,
|
|
431
|
-
ctrlFHijack: { type: 'boolean' },
|
|
432
|
-
defaultSampleLanguage: { type: 'string' },
|
|
433
|
-
disableDeepLinks: { type: 'boolean' },
|
|
434
|
-
disableSearch: { type: 'boolean' },
|
|
435
|
-
disableSidebar: { type: 'boolean' },
|
|
436
|
-
downloadDefinitionUrl: { type: 'string' },
|
|
437
|
-
expandDefaultServerVariables: { type: 'boolean' },
|
|
438
|
-
enumSkipQuotes: { type: 'boolean' },
|
|
439
|
-
expandDefaultRequest: { type: 'boolean' },
|
|
440
|
-
expandDefaultResponse: { type: 'boolean' },
|
|
441
|
-
expandResponses: { type: 'string' },
|
|
442
|
-
expandSingleSchemaField: { type: 'boolean' },
|
|
443
|
-
generateCodeSamples: GenerateCodeSamples,
|
|
444
|
-
generatedPayloadSamplesMaxDepth: { type: 'number' },
|
|
445
|
-
hideDownloadButton: { type: 'boolean' },
|
|
446
|
-
hideHostname: { type: 'boolean' },
|
|
447
|
-
hideInfoSection: { type: 'boolean' },
|
|
448
|
-
hideLogo: { type: 'boolean' },
|
|
449
|
-
hideRequestPayloadSample: { type: 'boolean' },
|
|
450
|
-
hideRightPanel: { type: 'boolean' },
|
|
451
|
-
hideSchemaPattern: { type: 'boolean' },
|
|
452
|
-
hideSingleRequestSampleTab: { type: 'boolean' },
|
|
453
|
-
hideSecuritySection: { type: 'boolean' },
|
|
454
|
-
hideTryItPanel: { type: 'boolean' },
|
|
455
|
-
hideFab: { type: 'boolean' },
|
|
456
|
-
hideOneOfDescription: { type: 'boolean' },
|
|
457
|
-
htmlTemplate: { type: 'string' },
|
|
458
|
-
jsonSampleExpandLevel: {
|
|
459
|
-
oneOf: [{ type: 'number', minimum: 1 }, { type: 'string' }],
|
|
460
|
-
},
|
|
461
|
-
labels: ConfigLabels,
|
|
462
|
-
menuToggle: { type: 'boolean' },
|
|
463
|
-
nativeScrollbars: { type: 'boolean' },
|
|
464
|
-
noAutoAuth: { type: 'boolean' },
|
|
465
|
-
onDeepLinkClick: { type: 'object' },
|
|
466
|
-
pagination: { enum: ['none', 'section', 'item'] },
|
|
467
|
-
pathInMiddlePanel: { type: 'boolean' },
|
|
468
|
-
payloadSampleIdx: { type: 'number', minimum: 0 },
|
|
469
|
-
requiredPropsFirst: { type: 'boolean' },
|
|
470
|
-
routingStrategy: { type: 'string' },
|
|
471
|
-
samplesTabsMaxCount: { type: 'number' },
|
|
472
|
-
schemaExpansionLevel: {
|
|
473
|
-
oneOf: [{ type: 'number', minimum: 0 }, { type: 'string' }],
|
|
474
|
-
},
|
|
475
|
-
minCharacterLengthToInitSearch: { type: 'number', minimum: 1 },
|
|
476
|
-
maxResponseHeadersToShowInTryIt: { type: 'number', minimum: 0 },
|
|
477
|
-
scrollYOffset: {
|
|
478
|
-
oneOf: [{ type: 'number' }, { type: 'string' }],
|
|
479
|
-
},
|
|
480
|
-
searchAutoExpand: { type: 'boolean' },
|
|
481
|
-
searchFieldLevelBoost: { type: 'number', minimum: 0 },
|
|
482
|
-
searchMaxDepth: { type: 'number', minimum: 1 },
|
|
483
|
-
searchMode: { type: 'string', enum: ['default', 'path-only'] },
|
|
484
|
-
searchOperationTitleBoost: { type: 'number' },
|
|
485
|
-
searchTagTitleBoost: { type: 'number' },
|
|
486
|
-
sendXUserAgentInTryIt: { type: 'boolean' },
|
|
487
|
-
showChangeLayoutButton: { type: 'boolean' },
|
|
488
|
-
showConsole: { type: 'boolean' },
|
|
489
|
-
showNextButton: { type: 'boolean' },
|
|
490
|
-
showRightPanelToggle: { type: 'boolean' },
|
|
491
|
-
showSecuritySchemeType: { type: 'boolean' },
|
|
492
|
-
showWebhookVerb: { type: 'boolean' },
|
|
493
|
-
showObjectSchemaExamples: { type: 'boolean' },
|
|
494
|
-
disableTryItRequestUrlEncoding: { type: 'boolean' },
|
|
495
|
-
sidebarLinks: ConfigSidebarLinks,
|
|
496
|
-
sideNavStyle: { type: 'string', enum: ['summary-only', 'path-first', 'id-only', 'path-only'] },
|
|
497
|
-
simpleOneOfTypeLabel: { type: 'boolean' },
|
|
498
|
-
sortEnumValuesAlphabetically: { type: 'boolean' },
|
|
499
|
-
sortOperationsAlphabetically: { type: 'boolean' },
|
|
500
|
-
sortPropsAlphabetically: { type: 'boolean' },
|
|
501
|
-
sortTagsAlphabetically: { type: 'boolean' },
|
|
502
|
-
suppressWarnings: { type: 'boolean' },
|
|
503
|
-
unstable_externalDescription: { type: 'boolean' },
|
|
504
|
-
unstable_ignoreMimeParameters: { type: 'boolean' },
|
|
505
|
-
untrustedDefinition: { type: 'boolean' },
|
|
506
|
-
showAccessMode: { type: 'boolean' },
|
|
507
|
-
preserveOriginalExtensionsName: { type: 'boolean' },
|
|
508
|
-
markdownHeadingsAnchorLevel: { type: 'number' },
|
|
509
|
-
},
|
|
510
|
-
additionalProperties: false,
|
|
511
|
-
};
|
|
512
|
-
function pickObjectProps(object, keys) {
|
|
513
|
-
return Object.fromEntries(keys.filter((key) => key in object).map((key) => [key, object[key]]));
|
|
514
|
-
}
|
|
515
|
-
function omitObjectProps(object, keys) {
|
|
516
|
-
return Object.fromEntries(Object.entries(object).filter(([key]) => !keys.includes(key)));
|
|
517
|
-
}
|
|
518
|
-
//# sourceMappingURL=reference-docs-config-schema.js.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.removePropertyRecursively = removePropertyRecursively;
|
|
4
|
-
function removePropertyRecursively(object, propToRemove, parentKey) {
|
|
5
|
-
return Object.fromEntries(Object.entries(object)
|
|
6
|
-
.map(([key, value]) => {
|
|
7
|
-
if (key === propToRemove && parentKey !== 'properties') {
|
|
8
|
-
return undefined;
|
|
9
|
-
}
|
|
10
|
-
if (typeof value !== 'object' || !value) {
|
|
11
|
-
return [key, value];
|
|
12
|
-
}
|
|
13
|
-
if (Array.isArray(value)) {
|
|
14
|
-
return [
|
|
15
|
-
key,
|
|
16
|
-
value.map((arrayItem) => typeof arrayItem === 'object'
|
|
17
|
-
? removePropertyRecursively(arrayItem, propToRemove, key)
|
|
18
|
-
: arrayItem),
|
|
19
|
-
];
|
|
20
|
-
}
|
|
21
|
-
return [
|
|
22
|
-
key,
|
|
23
|
-
removePropertyRecursively(value, propToRemove, key),
|
|
24
|
-
];
|
|
25
|
-
})
|
|
26
|
-
.filter(Boolean));
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=remove-property-recursively.js.map
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.reuniteConfigSchema = void 0;
|
|
4
|
-
const jobInputsSchema = {
|
|
5
|
-
type: 'object',
|
|
6
|
-
additionalProperties: { type: 'string' },
|
|
7
|
-
};
|
|
8
|
-
const jobServersSchema = {
|
|
9
|
-
type: 'object',
|
|
10
|
-
additionalProperties: false,
|
|
11
|
-
patternProperties: {
|
|
12
|
-
'^[a-zA-Z0-9_-]+$': {
|
|
13
|
-
type: 'string',
|
|
14
|
-
pattern: '^https?://[^\\s/$.?#].[^\\s]*$',
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
};
|
|
18
|
-
const severitySchema = {
|
|
19
|
-
type: 'string',
|
|
20
|
-
enum: ['error', 'warn', 'off'],
|
|
21
|
-
};
|
|
22
|
-
const jobSeveritySchema = {
|
|
23
|
-
type: 'object',
|
|
24
|
-
additionalProperties: false,
|
|
25
|
-
properties: {
|
|
26
|
-
schemaCheck: severitySchema,
|
|
27
|
-
statusCodeCheck: severitySchema,
|
|
28
|
-
contentTypeCheck: severitySchema,
|
|
29
|
-
successCriteriaCheck: severitySchema,
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
const jobTriggerIntervalSchema = {
|
|
33
|
-
type: 'object',
|
|
34
|
-
properties: {
|
|
35
|
-
event: { type: 'string', enum: ['schedule'] },
|
|
36
|
-
interval: {
|
|
37
|
-
type: 'string',
|
|
38
|
-
enum: ['1m', '2m', '5m', '10m', '15m', '30m', '1h', '3h', '6h', '12h', '1d', '7d'],
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
required: ['event'],
|
|
42
|
-
additionalProperties: false,
|
|
43
|
-
};
|
|
44
|
-
const jobTriggerBuildSchema = {
|
|
45
|
-
type: 'object',
|
|
46
|
-
properties: {
|
|
47
|
-
event: { type: 'string', enum: ['build'] },
|
|
48
|
-
},
|
|
49
|
-
required: ['event'],
|
|
50
|
-
additionalProperties: false,
|
|
51
|
-
};
|
|
52
|
-
const sloSchema = {
|
|
53
|
-
type: 'object',
|
|
54
|
-
properties: {
|
|
55
|
-
warn: { type: 'number' },
|
|
56
|
-
error: { type: 'number' },
|
|
57
|
-
},
|
|
58
|
-
additionalProperties: false,
|
|
59
|
-
};
|
|
60
|
-
exports.reuniteConfigSchema = {
|
|
61
|
-
type: 'object',
|
|
62
|
-
properties: {
|
|
63
|
-
ignoreLint: {
|
|
64
|
-
oneOf: [
|
|
65
|
-
{ type: 'boolean', default: false },
|
|
66
|
-
{
|
|
67
|
-
type: 'object',
|
|
68
|
-
additionalProperties: { type: 'boolean' },
|
|
69
|
-
},
|
|
70
|
-
],
|
|
71
|
-
},
|
|
72
|
-
ignoreLinkChecker: { type: 'boolean' },
|
|
73
|
-
ignoreMarkdocErrors: { type: 'boolean' },
|
|
74
|
-
ignoreRespectMonitoring: { type: 'boolean' },
|
|
75
|
-
jobs: {
|
|
76
|
-
type: 'array',
|
|
77
|
-
items: {
|
|
78
|
-
type: 'object',
|
|
79
|
-
properties: {
|
|
80
|
-
path: {
|
|
81
|
-
type: 'string',
|
|
82
|
-
pattern: '^(?!\\/|\\.\\./)',
|
|
83
|
-
},
|
|
84
|
-
agent: {
|
|
85
|
-
type: 'string',
|
|
86
|
-
enum: ['respect'],
|
|
87
|
-
},
|
|
88
|
-
trigger: {
|
|
89
|
-
oneOf: [jobTriggerIntervalSchema, jobTriggerBuildSchema],
|
|
90
|
-
},
|
|
91
|
-
inputs: jobInputsSchema,
|
|
92
|
-
servers: jobServersSchema,
|
|
93
|
-
severity: jobSeveritySchema,
|
|
94
|
-
slo: sloSchema,
|
|
95
|
-
},
|
|
96
|
-
required: ['path', 'trigger', 'agent'],
|
|
97
|
-
additionalProperties: false,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
additionalProperties: false,
|
|
102
|
-
};
|
|
103
|
-
//# sourceMappingURL=reunite-config-schema.js.map
|