@redocly/config 0.47.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.
Files changed (80) hide show
  1. package/lib/index.d.ts +9 -9
  2. package/lib/index.js +1 -41
  3. package/lib/package.json +3 -0
  4. package/lib/root-config-schema.d.ts +16 -1
  5. package/lib/types/api-functions-types.d.ts +2 -2
  6. package/lib/types/asyncapi-types.d.ts +1 -1
  7. package/lib/types/catalog-entity-types.d.ts +2 -2
  8. package/lib/types/config-types.d.ts +10 -10
  9. package/lib/types/graphql-types.d.ts +1 -1
  10. package/lib/types/index.d.ts +4 -4
  11. package/lib/types/portal-shared-types.d.ts +4 -4
  12. package/lib/types/redoc-types.d.ts +1 -1
  13. package/lib-esm/index.d.ts +9 -9
  14. package/lib-esm/index.js +1 -10
  15. package/lib-esm/root-config-schema.d.ts +16 -1
  16. package/lib-esm/types/api-functions-types.d.ts +2 -2
  17. package/lib-esm/types/asyncapi-types.d.ts +1 -1
  18. package/lib-esm/types/catalog-entity-types.d.ts +2 -2
  19. package/lib-esm/types/config-types.d.ts +10 -10
  20. package/lib-esm/types/graphql-types.d.ts +1 -1
  21. package/lib-esm/types/index.d.ts +4 -4
  22. package/lib-esm/types/portal-shared-types.d.ts +4 -4
  23. package/lib-esm/types/redoc-types.d.ts +1 -1
  24. package/package.json +19 -4
  25. package/lib/asyncapi-config-schema.js +0 -53
  26. package/lib/common.js +0 -103
  27. package/lib/constants/config.js +0 -17
  28. package/lib/constants/entities.js +0 -58
  29. package/lib/constants/enum.js +0 -6
  30. package/lib/constants/shared.js +0 -22
  31. package/lib/default-theme-config-schema.js +0 -57
  32. package/lib/entities-catalog-config-schema.js +0 -186
  33. package/lib/entities-catalog-entity-file-schema.js +0 -283
  34. package/lib/ex-theme-config-schemas.js +0 -687
  35. package/lib/feedback-config-schema.js +0 -88
  36. package/lib/graphql-config-schema.js +0 -157
  37. package/lib/product-override-schema.js +0 -44
  38. package/lib/redoc-config-schema.js +0 -120
  39. package/lib/reference-docs-config-schema.js +0 -518
  40. package/lib/remove-property-recursively.js +0 -28
  41. package/lib/reunite-config-schema.js +0 -103
  42. package/lib/root-config-schema.js +0 -587
  43. package/lib/scorecards-config-schema.js +0 -242
  44. package/lib/types/api-functions-types.js +0 -3
  45. package/lib/types/asyncapi-types.js +0 -3
  46. package/lib/types/catalog-entity-types.js +0 -3
  47. package/lib/types/code-walkthrough-types.js +0 -3
  48. package/lib/types/config-types.js +0 -3
  49. package/lib/types/graphql-types.js +0 -3
  50. package/lib/types/index.js +0 -21
  51. package/lib/types/portal-shared-types.js +0 -18
  52. package/lib/types/redoc-types.js +0 -3
  53. package/lib-esm/asyncapi-config-schema.js +0 -50
  54. package/lib-esm/common.js +0 -100
  55. package/lib-esm/constants/config.js +0 -14
  56. package/lib-esm/constants/entities.js +0 -55
  57. package/lib-esm/constants/enum.js +0 -2
  58. package/lib-esm/constants/shared.js +0 -19
  59. package/lib-esm/default-theme-config-schema.js +0 -54
  60. package/lib-esm/entities-catalog-config-schema.js +0 -183
  61. package/lib-esm/entities-catalog-entity-file-schema.js +0 -280
  62. package/lib-esm/ex-theme-config-schemas.js +0 -684
  63. package/lib-esm/feedback-config-schema.js +0 -85
  64. package/lib-esm/graphql-config-schema.js +0 -154
  65. package/lib-esm/product-override-schema.js +0 -41
  66. package/lib-esm/redoc-config-schema.js +0 -117
  67. package/lib-esm/reference-docs-config-schema.js +0 -515
  68. package/lib-esm/remove-property-recursively.js +0 -25
  69. package/lib-esm/reunite-config-schema.js +0 -100
  70. package/lib-esm/root-config-schema.js +0 -584
  71. package/lib-esm/scorecards-config-schema.js +0 -239
  72. package/lib-esm/types/api-functions-types.js +0 -2
  73. package/lib-esm/types/asyncapi-types.js +0 -2
  74. package/lib-esm/types/catalog-entity-types.js +0 -2
  75. package/lib-esm/types/code-walkthrough-types.js +0 -2
  76. package/lib-esm/types/config-types.js +0 -2
  77. package/lib-esm/types/graphql-types.js +0 -2
  78. package/lib-esm/types/index.js +0 -5
  79. package/lib-esm/types/portal-shared-types.js +0 -2
  80. package/lib-esm/types/redoc-types.js +0 -2
@@ -1,684 +0,0 @@
1
- import { redocConfigSchema } from './redoc-config-schema';
2
- import { deprecatedRefDocsSchema } from './reference-docs-config-schema';
3
- import { configGovernanceSchema } from './common';
4
- import { CONFIG_NODE_TYPE_NAMES } from './constants/config';
5
- const hideConfigSchema = {
6
- type: 'object',
7
- properties: {
8
- hide: { type: 'boolean' },
9
- },
10
- additionalProperties: false,
11
- };
12
- const scriptConfigSchema = {
13
- type: 'object',
14
- properties: {
15
- src: { type: 'string' },
16
- async: { type: 'boolean' },
17
- crossorigin: { type: 'string' },
18
- defer: { type: 'boolean' },
19
- fetchpriority: { type: 'string' },
20
- integrity: { type: 'string' },
21
- module: { type: 'boolean' },
22
- nomodule: { type: 'boolean' },
23
- nonce: { type: 'string' },
24
- referrerpolicy: { type: 'string' },
25
- type: { type: 'string' },
26
- },
27
- required: ['src'],
28
- additionalProperties: true,
29
- };
30
- const navItemSchema = {
31
- type: 'object',
32
- properties: {
33
- page: { type: 'string' },
34
- directory: { type: 'string' },
35
- disconnect: { type: 'boolean', default: false },
36
- group: { type: 'string' },
37
- label: { type: 'string' },
38
- href: { type: 'string' },
39
- external: { type: 'boolean' },
40
- labelTranslationKey: { type: 'string' },
41
- groupTranslationKey: { type: 'string' },
42
- icon: {
43
- oneOf: [
44
- { type: 'string' },
45
- { type: 'object', properties: { srcSet: { type: 'string' } }, required: ['srcSet'] },
46
- ],
47
- },
48
- separator: { type: 'string' },
49
- separatorLine: { type: 'boolean' },
50
- linePosition: {
51
- type: 'string',
52
- enum: ['top', 'bottom'],
53
- default: 'top',
54
- },
55
- version: { type: 'string' },
56
- menuStyle: { type: 'string', enum: ['drilldown'] },
57
- expanded: { type: 'string', const: 'always' },
58
- selectFirstItemOnExpand: { type: 'boolean' },
59
- flatten: { type: 'boolean' },
60
- linkedSidebars: {
61
- type: 'array',
62
- items: { type: 'string' },
63
- },
64
- // Allow users to eject the navbar and implement additional levels of nesting
65
- items: { type: 'array', items: { type: 'object', additionalProperties: true } },
66
- rbac: {
67
- type: 'object',
68
- additionalProperties: { type: 'string' },
69
- },
70
- additionalProps: { type: 'object', additionalProperties: true },
71
- },
72
- };
73
- export const navItemsSchema = {
74
- type: 'array',
75
- items: Object.assign(Object.assign({}, navItemSchema), { properties: Object.assign(Object.assign({}, navItemSchema.properties), { items: { type: 'array', items: navItemSchema } }) }),
76
- };
77
- export const productConfigSchema = {
78
- type: 'object',
79
- properties: {
80
- name: { type: 'string' },
81
- icon: { type: 'string' },
82
- folder: { type: 'string' },
83
- },
84
- additionalProperties: false,
85
- required: ['name', 'folder'],
86
- };
87
- /**
88
- * @deprecated Use `aiAssistant` configuration instead of `search.ai`
89
- */
90
- export const aiSearchConfigSchema = {
91
- type: 'object',
92
- properties: {
93
- hide: {
94
- type: 'boolean',
95
- default: false,
96
- },
97
- suggestions: {
98
- default: [],
99
- type: 'array',
100
- items: {
101
- type: 'string',
102
- },
103
- },
104
- prompt: {
105
- type: 'string',
106
- },
107
- },
108
- additionalProperties: false,
109
- };
110
- export const searchFacetsConfigSchema = {
111
- type: 'array',
112
- items: {
113
- type: 'object',
114
- required: ['name', 'field', 'type'],
115
- properties: {
116
- name: { type: 'string' },
117
- field: { type: 'string' },
118
- type: {
119
- type: 'string',
120
- enum: ['multi-select', 'select', 'tags'],
121
- },
122
- },
123
- additionalProperties: false,
124
- },
125
- };
126
- export const searchFiltersConfigSchema = {
127
- type: 'object',
128
- properties: Object.assign({ facets: searchFacetsConfigSchema }, hideConfigSchema.properties),
129
- additionalProperties: false,
130
- };
131
- const searchSuggestedPageSchema = {
132
- type: 'object',
133
- properties: {
134
- page: { type: 'string' },
135
- label: { type: 'string' },
136
- labelTranslationKey: { type: 'string' },
137
- },
138
- required: ['page'],
139
- };
140
- export const logoConfigSchema = {
141
- type: 'object',
142
- properties: {
143
- image: { type: 'string' },
144
- srcSet: { type: 'string' },
145
- altText: { type: 'string' },
146
- link: { type: 'string' },
147
- favicon: { type: 'string' },
148
- },
149
- additionalProperties: false,
150
- };
151
- export const navbarConfigSchema = {
152
- type: 'object',
153
- properties: Object.assign({ items: navItemsSchema }, hideConfigSchema.properties),
154
- additionalProperties: false,
155
- };
156
- export const productsConfigSchema = {
157
- type: 'object',
158
- additionalProperties: productConfigSchema,
159
- };
160
- export const footerConfigSchema = {
161
- type: 'object',
162
- properties: Object.assign({ items: navItemsSchema, copyrightText: { type: 'string' }, logo: hideConfigSchema }, hideConfigSchema.properties),
163
- additionalProperties: false,
164
- };
165
- export const sidebarConfigSchema = {
166
- type: 'object',
167
- properties: Object.assign({ separatorLine: { type: 'boolean' }, linePosition: {
168
- type: 'string',
169
- enum: ['top', 'bottom'],
170
- default: 'bottom',
171
- } }, hideConfigSchema.properties),
172
- additionalProperties: false,
173
- };
174
- export const scriptsConfigSchema = {
175
- type: 'object',
176
- properties: {
177
- head: { type: 'array', items: scriptConfigSchema },
178
- body: { type: 'array', items: scriptConfigSchema },
179
- },
180
- additionalProperties: false,
181
- };
182
- export const linksConfigSchema = {
183
- type: 'array',
184
- items: {
185
- type: 'object',
186
- properties: {
187
- href: { type: 'string' },
188
- as: { type: 'string' },
189
- crossorigin: { type: 'string' },
190
- fetchpriority: { type: 'string' },
191
- hreflang: { type: 'string' },
192
- imagesizes: { type: 'string' },
193
- imagesrcset: { type: 'string' },
194
- integrity: { type: 'string' },
195
- media: { type: 'string' },
196
- prefetch: { type: 'string' },
197
- referrerpolicy: { type: 'string' },
198
- rel: { type: 'string' },
199
- sizes: { type: 'string' },
200
- title: { type: 'string' },
201
- type: { type: 'string' },
202
- },
203
- required: ['href'],
204
- additionalProperties: true,
205
- },
206
- };
207
- export const searchConfigSchema = {
208
- type: 'object',
209
- properties: Object.assign({ engine: {
210
- type: 'string',
211
- enum: ['flexsearch', 'typesense'],
212
- default: 'flexsearch',
213
- }, ai: aiSearchConfigSchema, filters: searchFiltersConfigSchema, placement: {
214
- type: 'string',
215
- default: 'navbar',
216
- }, shortcuts: {
217
- type: 'array',
218
- items: { type: 'string' },
219
- default: ['⌘+K,ctrl+K'],
220
- }, suggestedPages: {
221
- type: 'array',
222
- items: searchSuggestedPageSchema,
223
- } }, hideConfigSchema.properties),
224
- additionalProperties: false,
225
- };
226
- export const aiAssistantSchema = {
227
- type: 'object',
228
- properties: {
229
- hide: {
230
- type: 'boolean',
231
- // set default to false when removing search.ai backwards compatibility
232
- },
233
- suggestions: {
234
- default: [],
235
- type: 'array',
236
- items: {
237
- type: 'string',
238
- },
239
- },
240
- prompt: {
241
- type: 'string',
242
- },
243
- trigger: {
244
- type: 'object',
245
- properties: {
246
- hide: {
247
- type: 'boolean',
248
- default: false,
249
- },
250
- inputType: {
251
- type: 'string',
252
- enum: ['button', 'icon'],
253
- default: 'button',
254
- },
255
- inputIcon: {
256
- type: 'string',
257
- enum: ['chat', 'sparkles', 'redocly'],
258
- default: 'sparkles',
259
- },
260
- },
261
- additionalProperties: false,
262
- },
263
- },
264
- additionalProperties: false,
265
- };
266
- export const colorModeConfigSchema = {
267
- type: 'object',
268
- properties: Object.assign({ ignoreDetection: { type: 'boolean' }, modes: {
269
- type: 'array',
270
- items: { type: 'string' },
271
- default: ['light', 'dark'],
272
- } }, hideConfigSchema.properties),
273
- additionalProperties: false,
274
- };
275
- export const paletteConfigSchema = {
276
- type: 'string',
277
- enum: ['slate', 'pink', 'coral', 'amber', 'jade', 'cyan', 'ocean', 'indigo', 'iris'],
278
- };
279
- const navigationActionsConfigSchema = {
280
- type: 'object',
281
- properties: Object.assign(Object.assign({}, hideConfigSchema.properties), { items: {
282
- type: 'array',
283
- items: {
284
- type: 'string',
285
- enum: ['copy', 'view', 'chatgpt', 'claude', 'docs-mcp-cursor', 'docs-mcp-vscode'],
286
- },
287
- default: ['copy', 'view', 'chatgpt', 'claude', 'docs-mcp-cursor', 'docs-mcp-vscode'],
288
- } }),
289
- additionalProperties: false,
290
- };
291
- export const navigationConfigSchema = {
292
- type: 'object',
293
- properties: {
294
- nextButton: {
295
- type: 'object',
296
- properties: Object.assign({ text: { type: 'string' } }, hideConfigSchema.properties),
297
- additionalProperties: false,
298
- default: {},
299
- },
300
- previousButton: {
301
- type: 'object',
302
- properties: Object.assign({ text: { type: 'string' } }, hideConfigSchema.properties),
303
- additionalProperties: false,
304
- default: {},
305
- },
306
- actions: navigationActionsConfigSchema,
307
- },
308
- additionalProperties: false,
309
- };
310
- export const codeSnippetConfigSchema = {
311
- type: 'object',
312
- properties: {
313
- elementFormat: { type: 'string', default: 'icon' },
314
- copy: {
315
- type: 'object',
316
- properties: Object.assign({}, hideConfigSchema.properties),
317
- additionalProperties: false,
318
- default: { hide: false },
319
- },
320
- report: {
321
- type: 'object',
322
- properties: Object.assign({ tooltipText: { type: 'string' }, buttonText: { type: 'string' }, label: { type: 'string' } }, hideConfigSchema.properties),
323
- additionalProperties: false,
324
- default: { hide: false },
325
- },
326
- expand: {
327
- type: 'object',
328
- properties: Object.assign({}, hideConfigSchema.properties),
329
- additionalProperties: false,
330
- default: { hide: false },
331
- },
332
- collapse: {
333
- type: 'object',
334
- properties: Object.assign({}, hideConfigSchema.properties),
335
- additionalProperties: false,
336
- default: { hide: false },
337
- },
338
- },
339
- additionalProperties: false,
340
- };
341
- export const markdownConfigSchema = {
342
- type: 'object',
343
- properties: {
344
- frontMatterKeysToResolve: {
345
- type: 'array',
346
- items: { type: 'string' },
347
- default: ['image', 'links'],
348
- },
349
- partialsFolders: {
350
- type: 'array',
351
- items: { type: 'string' },
352
- default: ['**/_partials/**'],
353
- },
354
- lastUpdatedBlock: {
355
- type: 'object',
356
- properties: Object.assign({ format: {
357
- type: 'string',
358
- enum: ['timeago', 'iso', 'long', 'short'],
359
- default: 'timeago',
360
- }, locale: { type: 'string' } }, hideConfigSchema.properties),
361
- additionalProperties: false,
362
- default: {},
363
- },
364
- toc: {
365
- type: 'object',
366
- properties: Object.assign({ header: { type: 'string', default: 'On this page' }, depth: { type: 'integer', default: 3, minimum: 1 } }, hideConfigSchema.properties),
367
- additionalProperties: false,
368
- default: {},
369
- },
370
- editPage: {
371
- type: 'object',
372
- properties: Object.assign({ baseUrl: { type: 'string' } }, hideConfigSchema.properties),
373
- additionalProperties: false,
374
- default: {},
375
- },
376
- },
377
- additionalProperties: false,
378
- default: {},
379
- };
380
- export const openapiConfigSchema = Object.assign(Object.assign({}, redocConfigSchema), { properties: Object.assign(Object.assign({}, redocConfigSchema.properties), deprecatedRefDocsSchema.properties) });
381
- export const asyncapiConfigSchema = Object.assign(Object.assign({}, redocConfigSchema), { properties: Object.assign(Object.assign({}, redocConfigSchema.properties), deprecatedRefDocsSchema.properties) });
382
- const adobeAnalyticsConfigSchema = {
383
- type: 'object',
384
- properties: {
385
- includeInDevelopment: { type: 'boolean' },
386
- scriptUrl: { type: 'string' },
387
- pageViewEventName: { type: 'string' },
388
- },
389
- additionalProperties: false,
390
- required: ['scriptUrl'],
391
- };
392
- export const amplitudeAnalyticsConfigSchema = {
393
- type: 'object',
394
- properties: {
395
- includeInDevelopment: { type: 'boolean' },
396
- apiKey: { type: 'string' },
397
- head: { type: 'boolean' },
398
- respectDNT: { type: 'boolean' },
399
- exclude: { type: 'array', items: { type: 'string' } },
400
- outboundClickEventName: { type: 'string' },
401
- pageViewEventName: { type: 'string' },
402
- amplitudeConfig: { type: 'object', additionalProperties: true },
403
- },
404
- additionalProperties: false,
405
- required: ['apiKey'],
406
- };
407
- export const fullstoryAnalyticsConfigSchema = {
408
- type: 'object',
409
- properties: {
410
- includeInDevelopment: { type: 'boolean' },
411
- orgId: { type: 'string' },
412
- },
413
- additionalProperties: false,
414
- required: ['orgId'],
415
- };
416
- export const heapAnalyticsConfigSchema = {
417
- type: 'object',
418
- properties: {
419
- includeInDevelopment: { type: 'boolean' },
420
- appId: { type: 'string' },
421
- },
422
- additionalProperties: false,
423
- required: ['appId'],
424
- };
425
- export const rudderstackAnalyticsConfigSchema = {
426
- type: 'object',
427
- properties: {
428
- includeInDevelopment: { type: 'boolean' },
429
- writeKey: { type: 'string', minLength: 10 },
430
- trackPage: { type: 'boolean' },
431
- dataPlaneUrl: { type: 'string' },
432
- controlPlaneUrl: { type: 'string' },
433
- sdkUrl: { type: 'string' },
434
- loadOptions: { type: 'object', additionalProperties: true },
435
- },
436
- additionalProperties: false,
437
- required: ['writeKey'],
438
- };
439
- export const segmentAnalyticsConfigSchema = {
440
- type: 'object',
441
- properties: {
442
- includeInDevelopment: { type: 'boolean' },
443
- writeKey: { type: 'string', minLength: 10 },
444
- trackPage: { type: 'boolean' },
445
- includeTitleInPageCall: { type: 'boolean' },
446
- host: { type: 'string' },
447
- },
448
- additionalProperties: false,
449
- required: ['writeKey'],
450
- };
451
- export const gtmAnalyticsConfigSchema = {
452
- type: 'object',
453
- properties: {
454
- includeInDevelopment: { type: 'boolean' },
455
- trackingId: { type: 'string' },
456
- gtmAuth: { type: 'string' },
457
- gtmPreview: { type: 'string' },
458
- defaultDataLayer: {},
459
- dataLayerName: { type: 'string' },
460
- enableWebVitalsTracking: { type: 'boolean' },
461
- selfHostedOrigin: { type: 'string' },
462
- pageViewEventName: { type: 'string' },
463
- },
464
- additionalProperties: false,
465
- required: ['trackingId'],
466
- };
467
- export const productGoogleAnalyticsConfigSchema = {
468
- type: 'object',
469
- properties: {
470
- includeInDevelopment: { type: 'boolean' },
471
- trackingId: { type: 'string' },
472
- conversionId: { type: 'string' },
473
- floodlightId: { type: 'string' },
474
- optimizeId: { type: 'string' },
475
- exclude: { type: 'array', items: { type: 'string' } },
476
- },
477
- additionalProperties: false,
478
- required: ['trackingId'],
479
- };
480
- export const googleAnalyticsConfigSchema = {
481
- type: 'object',
482
- properties: {
483
- includeInDevelopment: { type: 'boolean' },
484
- trackingId: { type: 'string' },
485
- conversionId: { type: 'string' },
486
- floodlightId: { type: 'string' },
487
- head: { type: 'boolean' },
488
- respectDNT: { type: 'boolean' },
489
- exclude: { type: 'array', items: { type: 'string' } },
490
- optimizeId: { type: 'string' },
491
- anonymizeIp: { type: 'boolean' },
492
- cookieExpires: { type: 'number' },
493
- // All enabled tracking configs
494
- trackers: {
495
- type: 'object',
496
- additionalProperties: productGoogleAnalyticsConfigSchema,
497
- },
498
- },
499
- additionalProperties: false,
500
- required: ['trackingId'],
501
- };
502
- export const analyticsConfigSchema = {
503
- type: 'object',
504
- properties: {
505
- adobe: adobeAnalyticsConfigSchema,
506
- amplitude: amplitudeAnalyticsConfigSchema,
507
- fullstory: fullstoryAnalyticsConfigSchema,
508
- heap: heapAnalyticsConfigSchema,
509
- rudderstack: rudderstackAnalyticsConfigSchema,
510
- segment: segmentAnalyticsConfigSchema,
511
- gtm: gtmAnalyticsConfigSchema,
512
- ga: googleAnalyticsConfigSchema,
513
- },
514
- };
515
- export const userMenuConfigSchema = {
516
- type: 'object',
517
- properties: Object.assign({ items: {
518
- type: 'array',
519
- items: {
520
- type: 'object',
521
- properties: {
522
- label: { type: 'string' },
523
- external: { type: 'boolean' },
524
- link: { type: 'string' },
525
- separatorLine: { type: 'boolean' },
526
- },
527
- additionalProperties: true,
528
- },
529
- default: [],
530
- }, hideLoginButton: { type: 'boolean' } }, hideConfigSchema.properties),
531
- additionalProperties: false,
532
- };
533
- export const versionPickerConfigSchema = {
534
- type: 'object',
535
- properties: {
536
- hide: { type: 'boolean' },
537
- showForUnversioned: {
538
- type: 'boolean',
539
- },
540
- },
541
- };
542
- export const breadcrumbsConfigSchema = {
543
- type: 'object',
544
- properties: {
545
- hide: { type: 'boolean' },
546
- prefixItems: {
547
- type: 'array',
548
- items: {
549
- type: 'object',
550
- properties: {
551
- label: { type: 'string' },
552
- labelTranslationKey: { type: 'string' },
553
- page: { type: 'string' },
554
- icon: { type: 'string' },
555
- },
556
- additionalProperties: false,
557
- default: {},
558
- },
559
- },
560
- },
561
- additionalProperties: false,
562
- };
563
- export const catalogFilterSchema = {
564
- type: 'object',
565
- additionalProperties: false,
566
- required: ['title', 'property'],
567
- properties: {
568
- type: {
569
- type: 'string',
570
- enum: ['select', 'checkboxes', 'date-range'],
571
- default: 'checkboxes',
572
- },
573
- title: { type: 'string' },
574
- titleTranslationKey: { type: 'string' },
575
- property: { type: 'string' },
576
- parentFilter: { type: 'string' },
577
- valuesMapping: { type: 'object', additionalProperties: { type: 'string' } },
578
- missingCategoryName: { type: 'string' },
579
- missingCategoryNameTranslationKey: { type: 'string' },
580
- options: { type: 'array', items: { type: 'string' } },
581
- },
582
- };
583
- export const catalogSchema = {
584
- type: 'object',
585
- additionalProperties: true,
586
- required: ['slug', 'items'],
587
- properties: {
588
- show: { type: 'boolean' },
589
- slug: { type: 'string' },
590
- filters: { type: 'array', items: catalogFilterSchema },
591
- groupByFirstFilter: { type: 'boolean' },
592
- filterValuesCasing: {
593
- type: 'string',
594
- enum: ['sentence', 'original', 'lowercase', 'uppercase'],
595
- },
596
- items: navItemsSchema,
597
- requiredPermission: { type: 'string' },
598
- separateVersions: { type: 'boolean' },
599
- title: { type: 'string' },
600
- titleTranslationKey: { type: 'string' },
601
- description: { type: 'string' },
602
- descriptionTranslationKey: { type: 'string' },
603
- },
604
- };
605
- export const catalogsConfigSchema = {
606
- type: 'object',
607
- patternProperties: {
608
- '.*': catalogSchema,
609
- },
610
- };
611
- export const scorecardConfigSchema = {
612
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassic,
613
- description: 'Add and create sets of rules and test your API description files against them. With these rules you can maintain quality across your existing APIs and ensure that newly-added or updated APIs match your criteria. An API scorecard can include multiple sets of rules, corresponding to different quality levels.',
614
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic',
615
- type: 'object',
616
- additionalProperties: true,
617
- required: [],
618
- properties: {
619
- /**
620
- * @deprecated Should use `reunite.ignoreLint` instead
621
- */
622
- ignoreNonCompliant: { type: 'boolean', default: false },
623
- teamMetadataProperty: {
624
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicTeamMetadataProperty,
625
- description: 'Provide custom team label and team metadata property.',
626
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic#team-metadata-object',
627
- type: 'object',
628
- properties: {
629
- property: { type: 'string' },
630
- label: { type: 'string' },
631
- default: { type: 'string' },
632
- },
633
- },
634
- levels: {
635
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicLevelList,
636
- description: 'List of levels to score against.',
637
- type: 'array',
638
- items: {
639
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicLevel,
640
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic#level-object',
641
- type: 'object',
642
- required: ['name'],
643
- properties: Object.assign({ name: { type: 'string' }, color: { type: 'string' } }, configGovernanceSchema),
644
- additionalProperties: false,
645
- },
646
- },
647
- targets: {
648
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicTargetList,
649
- description: 'Provide custom `minimumLevel` for specific targets.',
650
- type: 'array',
651
- items: {
652
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicTarget,
653
- type: 'object',
654
- required: ['where'],
655
- properties: {
656
- minimumLevel: { type: 'string' },
657
- rules: { type: 'object', additionalProperties: true },
658
- where: {
659
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicTargetWhere,
660
- description: 'Specify which API descriptions to apply the `minimumLevel` to based on the metadata.',
661
- documentationLink: 'https://redocly.com/docs/realm/config/scorecard-classic#where-object',
662
- type: 'object',
663
- required: ['metadata'],
664
- properties: {
665
- metadata: {
666
- nodeTypeName: CONFIG_NODE_TYPE_NAMES.ScorecardClassicTargetWhereMetadata,
667
- type: 'object',
668
- additionalProperties: { type: 'string' },
669
- },
670
- },
671
- additionalProperties: false,
672
- },
673
- },
674
- additionalProperties: false,
675
- },
676
- },
677
- ignore: {
678
- type: 'array',
679
- items: { type: 'string' },
680
- },
681
- fromProjectUrl: { type: 'string', format: 'uri' },
682
- },
683
- };
684
- //# sourceMappingURL=ex-theme-config-schemas.js.map