@redocly/config 0.32.0 → 0.34.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.
Files changed (37) hide show
  1. package/lib/constants.d.ts +1 -0
  2. package/lib/constants.js +28 -1
  3. package/lib/default-theme-config-schema.d.ts +14 -1
  4. package/lib/entities-catalog-entity-file-schema.d.ts +964 -0
  5. package/lib/entities-catalog-entity-file-schema.js +273 -0
  6. package/lib/ex-theme-config-schemas.d.ts +4 -1
  7. package/lib/ex-theme-config-schemas.js +1 -1
  8. package/lib/graphql-config-schema.d.ts +10 -0
  9. package/lib/graphql-config-schema.js +7 -0
  10. package/lib/index.d.ts +2 -1
  11. package/lib/index.js +3 -1
  12. package/lib/product-override-schema.d.ts +35 -0
  13. package/lib/redoc-config-schema.d.ts +3 -0
  14. package/lib/redoc-config-schema.js +1 -0
  15. package/lib/reunite-config-schema.d.ts +1 -1
  16. package/lib/reunite-config-schema.js +1 -1
  17. package/lib/root-config-schema.d.ts +3250 -4438
  18. package/lib/types/catalog-entity-types.d.ts +38 -0
  19. package/lib-esm/constants.d.ts +1 -0
  20. package/lib-esm/constants.js +27 -0
  21. package/lib-esm/default-theme-config-schema.d.ts +14 -1
  22. package/lib-esm/entities-catalog-entity-file-schema.d.ts +964 -0
  23. package/lib-esm/entities-catalog-entity-file-schema.js +270 -0
  24. package/lib-esm/ex-theme-config-schemas.d.ts +4 -1
  25. package/lib-esm/ex-theme-config-schemas.js +1 -1
  26. package/lib-esm/graphql-config-schema.d.ts +10 -0
  27. package/lib-esm/graphql-config-schema.js +7 -0
  28. package/lib-esm/index.d.ts +2 -1
  29. package/lib-esm/index.js +2 -1
  30. package/lib-esm/product-override-schema.d.ts +35 -0
  31. package/lib-esm/redoc-config-schema.d.ts +3 -0
  32. package/lib-esm/redoc-config-schema.js +1 -0
  33. package/lib-esm/reunite-config-schema.d.ts +1 -1
  34. package/lib-esm/reunite-config-schema.js +1 -1
  35. package/lib-esm/root-config-schema.d.ts +3250 -4438
  36. package/lib-esm/types/catalog-entity-types.d.ts +38 -0
  37. package/package.json +1 -1
@@ -0,0 +1,273 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.entityFileSchema = exports.entityBaseProperties = exports.entityRelationFileSchema = exports.entityLinkFileSchema = exports.entityContactFileSchema = exports.slackContactFileSchema = exports.slackChannelFileSchema = exports.defaultMetadataSchema = exports.dataSchemaMetadataSchema = exports.apiOperationMetadataSchema = exports.apiDescriptionMetadataSchema = exports.userMetadataSchema = void 0;
4
+ const constants_1 = require("./constants");
5
+ exports.userMetadataSchema = {
6
+ type: 'object',
7
+ properties: {
8
+ email: {
9
+ type: 'string',
10
+ description: 'Email of the user',
11
+ },
12
+ },
13
+ required: ['email'],
14
+ additionalProperties: true,
15
+ };
16
+ exports.apiDescriptionMetadataSchema = {
17
+ type: 'object',
18
+ properties: {
19
+ specType: {
20
+ type: 'string',
21
+ enum: ['jsonschema', 'openapi', 'asyncapi', 'avro', 'zod', 'graphql', 'protobuf', 'arazzo'],
22
+ description: 'Type of the API description',
23
+ },
24
+ descriptionFile: {
25
+ type: 'string',
26
+ description: 'Path to the file containing the API description',
27
+ },
28
+ },
29
+ required: ['specType', 'descriptionFile'],
30
+ additionalProperties: true,
31
+ };
32
+ exports.apiOperationMetadataSchema = {
33
+ type: 'object',
34
+ properties: {
35
+ method: {
36
+ type: 'string',
37
+ enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'MUTATION', 'QUERY', 'SUBSCRIBE', 'PUBLISH'],
38
+ description: 'HTTP method of the API operation',
39
+ },
40
+ path: {
41
+ type: 'string',
42
+ description: 'Path of the API operation',
43
+ },
44
+ payload: {
45
+ type: 'array',
46
+ items: {
47
+ type: 'string',
48
+ description: 'Related dataSchema name',
49
+ },
50
+ },
51
+ responses: {
52
+ type: 'array',
53
+ items: {
54
+ type: 'string',
55
+ description: 'Related dataSchema name',
56
+ },
57
+ },
58
+ },
59
+ required: ['method', 'path'],
60
+ additionalProperties: true,
61
+ };
62
+ exports.dataSchemaMetadataSchema = {
63
+ type: 'object',
64
+ properties: {
65
+ specType: {
66
+ type: 'string',
67
+ enum: ['jsonschema', 'openapi', 'asyncapi', 'avro', 'zod', 'graphql', 'protobuf', 'arazzo'],
68
+ description: 'Specification type of the data schema',
69
+ },
70
+ schema: {
71
+ type: 'string',
72
+ description: 'Inline schema of the data structure',
73
+ },
74
+ },
75
+ required: ['specType', 'schema'],
76
+ additionalProperties: true,
77
+ };
78
+ exports.defaultMetadataSchema = {
79
+ type: 'object',
80
+ additionalProperties: true,
81
+ };
82
+ exports.slackChannelFileSchema = {
83
+ type: 'object',
84
+ properties: {
85
+ name: {
86
+ type: 'string',
87
+ minLength: 2,
88
+ maxLength: 150,
89
+ },
90
+ },
91
+ required: ['name'],
92
+ additionalProperties: false,
93
+ };
94
+ exports.slackContactFileSchema = {
95
+ type: 'object',
96
+ properties: {
97
+ channels: {
98
+ type: 'array',
99
+ items: {
100
+ type: 'object',
101
+ properties: {
102
+ name: {
103
+ type: 'string',
104
+ minLength: 2,
105
+ maxLength: 150,
106
+ },
107
+ },
108
+ required: ['name'],
109
+ additionalProperties: false,
110
+ },
111
+ },
112
+ },
113
+ required: ['channels'],
114
+ additionalProperties: false,
115
+ };
116
+ exports.entityContactFileSchema = {
117
+ type: 'object',
118
+ properties: {
119
+ slack: {
120
+ type: 'object',
121
+ properties: {
122
+ channels: {
123
+ type: 'array',
124
+ items: {
125
+ type: 'object',
126
+ properties: {
127
+ name: {
128
+ type: 'string',
129
+ minLength: 2,
130
+ maxLength: 150,
131
+ },
132
+ url: {
133
+ type: 'string',
134
+ },
135
+ },
136
+ required: ['name'],
137
+ additionalProperties: false,
138
+ },
139
+ },
140
+ },
141
+ required: ['channels'],
142
+ additionalProperties: false,
143
+ },
144
+ },
145
+ additionalProperties: false,
146
+ };
147
+ exports.entityLinkFileSchema = {
148
+ type: 'object',
149
+ properties: {
150
+ label: {
151
+ type: 'string',
152
+ minLength: 2,
153
+ maxLength: 150,
154
+ },
155
+ url: {
156
+ type: 'string',
157
+ },
158
+ },
159
+ required: ['label', 'url'],
160
+ additionalProperties: false,
161
+ };
162
+ exports.entityRelationFileSchema = {
163
+ type: 'object',
164
+ properties: {
165
+ type: {
166
+ type: 'string',
167
+ enum: constants_1.ENTITY_RELATION_TYPES,
168
+ },
169
+ key: {
170
+ type: 'string',
171
+ minLength: 2,
172
+ maxLength: 100,
173
+ },
174
+ },
175
+ required: ['type', 'key'],
176
+ additionalProperties: false,
177
+ };
178
+ // Base entity schema properties
179
+ exports.entityBaseProperties = {
180
+ key: {
181
+ type: 'string',
182
+ pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$',
183
+ minLength: 2,
184
+ maxLength: 150,
185
+ },
186
+ title: {
187
+ type: 'string',
188
+ minLength: 2,
189
+ maxLength: 200,
190
+ },
191
+ summary: {
192
+ type: ['string', 'null'],
193
+ minLength: 1,
194
+ maxLength: 500,
195
+ },
196
+ tags: {
197
+ type: ['array', 'null'],
198
+ items: {
199
+ type: 'string',
200
+ minLength: 1,
201
+ maxLength: 50,
202
+ },
203
+ },
204
+ git: {
205
+ type: ['array', 'null'],
206
+ items: {
207
+ type: 'string',
208
+ },
209
+ },
210
+ contact: {
211
+ anyOf: [{ type: 'null' }, exports.entityContactFileSchema],
212
+ },
213
+ links: {
214
+ anyOf: [
215
+ { type: 'null' },
216
+ {
217
+ type: 'array',
218
+ items: exports.entityLinkFileSchema,
219
+ },
220
+ ],
221
+ },
222
+ relations: {
223
+ anyOf: [
224
+ { type: 'null' },
225
+ {
226
+ type: 'array',
227
+ items: exports.entityRelationFileSchema,
228
+ },
229
+ ],
230
+ },
231
+ };
232
+ exports.entityFileSchema = {
233
+ type: 'object',
234
+ discriminator: {
235
+ propertyName: 'type',
236
+ },
237
+ oneOf: [
238
+ {
239
+ type: 'object',
240
+ properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'user' }, metadata: exports.userMetadataSchema }),
241
+ required: ['key', 'title', 'type', 'metadata'],
242
+ additionalProperties: false,
243
+ },
244
+ {
245
+ type: 'object',
246
+ properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'api-operation' }, metadata: exports.apiOperationMetadataSchema }),
247
+ required: ['key', 'title', 'type', 'metadata'],
248
+ additionalProperties: false,
249
+ },
250
+ {
251
+ type: 'object',
252
+ properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'data-schema' }, metadata: exports.dataSchemaMetadataSchema }),
253
+ required: ['key', 'title', 'type', 'metadata'],
254
+ additionalProperties: false,
255
+ },
256
+ {
257
+ type: 'object',
258
+ properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'api-description' }, metadata: exports.apiDescriptionMetadataSchema }),
259
+ required: ['key', 'title', 'type', 'metadata'],
260
+ additionalProperties: false,
261
+ },
262
+ {
263
+ type: 'object',
264
+ properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { enum: ['service', 'domain', 'team'] }, metadata: {
265
+ type: ['object', 'null'],
266
+ additionalProperties: true,
267
+ } }),
268
+ required: ['key', 'title', 'type'],
269
+ additionalProperties: false,
270
+ },
271
+ ],
272
+ };
273
+ //# sourceMappingURL=entities-catalog-entity-file-schema.js.map
@@ -1114,7 +1114,7 @@ export declare const markdownConfigSchema: {
1114
1114
  readonly items: {
1115
1115
  readonly type: "string";
1116
1116
  };
1117
- readonly default: readonly ["_partials"];
1117
+ readonly default: readonly ["**/_partials/**"];
1118
1118
  };
1119
1119
  readonly lastUpdatedBlock: {
1120
1120
  readonly type: "object";
@@ -2970,6 +2970,9 @@ export declare const openapiConfigSchema: {
2970
2970
  readonly excludeFromSearch: {
2971
2971
  readonly type: "boolean";
2972
2972
  };
2973
+ readonly showSchemaCatalogLinks: {
2974
+ readonly type: "boolean";
2975
+ };
2973
2976
  };
2974
2977
  readonly type: "object";
2975
2978
  readonly additionalProperties: false;
@@ -303,7 +303,7 @@ exports.markdownConfigSchema = {
303
303
  partialsFolders: {
304
304
  type: 'array',
305
305
  items: { type: 'string' },
306
- default: ['_partials'],
306
+ default: ['**/_partials/**'],
307
307
  },
308
308
  lastUpdatedBlock: {
309
309
  type: 'object',
@@ -435,6 +435,16 @@ export declare const graphqlConfigSchema: {
435
435
  };
436
436
  readonly additionalProperties: false;
437
437
  };
438
+ readonly layout: {
439
+ readonly type: "string";
440
+ readonly enum: readonly ["stacked", "three-panel"];
441
+ };
442
+ readonly showBuiltInScalars: {
443
+ readonly type: "boolean";
444
+ };
445
+ readonly showBuiltInDirectives: {
446
+ readonly type: "boolean";
447
+ };
438
448
  };
439
449
  readonly additionalProperties: false;
440
450
  };
@@ -113,6 +113,13 @@ exports.graphqlConfigSchema = {
113
113
  additionalProperties: true,
114
114
  },
115
115
  feedback: feedback_config_schema_1.feedbackConfigSchema,
116
+ layout: { type: 'string', enum: ['stacked', 'three-panel'] },
117
+ showBuiltInScalars: {
118
+ type: 'boolean',
119
+ },
120
+ showBuiltInDirectives: {
121
+ type: 'boolean',
122
+ },
116
123
  },
117
124
  additionalProperties: false,
118
125
  };
package/lib/index.d.ts CHANGED
@@ -2,4 +2,5 @@ export { productThemeOverrideSchema, productConfigOverrideSchema } from './produ
2
2
  export { rbacConfigSchema, rootRedoclyConfigSchema } from './root-config-schema';
3
3
  export { redocConfigSchema } from './redoc-config-schema';
4
4
  export * from './types';
5
- export { ApigeeDevOnboardingIntegrationAuthType, AuthProviderType, DEFAULT_TEAM_CLAIM_NAME, LayoutVariant, REDOCLY_TEAMS_RBAC, REDOCLY_ROUTE_RBAC, } from './constants';
5
+ export { ApigeeDevOnboardingIntegrationAuthType, AuthProviderType, DEFAULT_TEAM_CLAIM_NAME, LayoutVariant, REDOCLY_TEAMS_RBAC, REDOCLY_ROUTE_RBAC, ENTITY_RELATION_TYPES, } from './constants';
6
+ export * from './entities-catalog-entity-file-schema';
package/lib/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.DEFAULT_TEAM_CLAIM_NAME = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.redocConfigSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;
17
+ exports.ENTITY_RELATION_TYPES = exports.REDOCLY_ROUTE_RBAC = exports.REDOCLY_TEAMS_RBAC = exports.LayoutVariant = exports.DEFAULT_TEAM_CLAIM_NAME = exports.AuthProviderType = exports.ApigeeDevOnboardingIntegrationAuthType = exports.redocConfigSchema = exports.rootRedoclyConfigSchema = exports.rbacConfigSchema = exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;
18
18
  var product_override_schema_1 = require("./product-override-schema");
19
19
  Object.defineProperty(exports, "productThemeOverrideSchema", { enumerable: true, get: function () { return product_override_schema_1.productThemeOverrideSchema; } });
20
20
  Object.defineProperty(exports, "productConfigOverrideSchema", { enumerable: true, get: function () { return product_override_schema_1.productConfigOverrideSchema; } });
@@ -31,4 +31,6 @@ Object.defineProperty(exports, "DEFAULT_TEAM_CLAIM_NAME", { enumerable: true, ge
31
31
  Object.defineProperty(exports, "LayoutVariant", { enumerable: true, get: function () { return constants_1.LayoutVariant; } });
32
32
  Object.defineProperty(exports, "REDOCLY_TEAMS_RBAC", { enumerable: true, get: function () { return constants_1.REDOCLY_TEAMS_RBAC; } });
33
33
  Object.defineProperty(exports, "REDOCLY_ROUTE_RBAC", { enumerable: true, get: function () { return constants_1.REDOCLY_ROUTE_RBAC; } });
34
+ Object.defineProperty(exports, "ENTITY_RELATION_TYPES", { enumerable: true, get: function () { return constants_1.ENTITY_RELATION_TYPES; } });
35
+ __exportStar(require("./entities-catalog-entity-file-schema"), exports);
34
36
  //# sourceMappingURL=index.js.map
@@ -2429,6 +2429,9 @@ export declare const productThemeOverrideSchema: {
2429
2429
  readonly excludeFromSearch: {
2430
2430
  readonly type: "boolean";
2431
2431
  };
2432
+ readonly showSchemaCatalogLinks: {
2433
+ readonly type: "boolean";
2434
+ };
2432
2435
  };
2433
2436
  readonly type: "object";
2434
2437
  readonly additionalProperties: false;
@@ -4676,6 +4679,9 @@ export declare const productConfigOverrideSchema: {
4676
4679
  readonly excludeFromSearch: {
4677
4680
  readonly type: "boolean";
4678
4681
  };
4682
+ readonly showSchemaCatalogLinks: {
4683
+ readonly type: "boolean";
4684
+ };
4679
4685
  };
4680
4686
  readonly type: "object";
4681
4687
  readonly additionalProperties: false;
@@ -5117,6 +5123,16 @@ export declare const productConfigOverrideSchema: {
5117
5123
  };
5118
5124
  readonly additionalProperties: false;
5119
5125
  };
5126
+ readonly layout: {
5127
+ readonly type: "string";
5128
+ readonly enum: readonly ["stacked", "three-panel"];
5129
+ };
5130
+ readonly showBuiltInScalars: {
5131
+ readonly type: "boolean";
5132
+ };
5133
+ readonly showBuiltInDirectives: {
5134
+ readonly type: "boolean";
5135
+ };
5120
5136
  };
5121
5137
  readonly additionalProperties: false;
5122
5138
  };
@@ -6923,6 +6939,9 @@ export declare const productConfigOverrideSchema: {
6923
6939
  readonly excludeFromSearch: {
6924
6940
  readonly type: "boolean";
6925
6941
  };
6942
+ readonly showSchemaCatalogLinks: {
6943
+ readonly type: "boolean";
6944
+ };
6926
6945
  };
6927
6946
  readonly type: "object";
6928
6947
  readonly additionalProperties: false;
@@ -7364,6 +7383,16 @@ export declare const productConfigOverrideSchema: {
7364
7383
  };
7365
7384
  readonly additionalProperties: false;
7366
7385
  };
7386
+ readonly layout: {
7387
+ readonly type: "string";
7388
+ readonly enum: readonly ["stacked", "three-panel"];
7389
+ };
7390
+ readonly showBuiltInScalars: {
7391
+ readonly type: "boolean";
7392
+ };
7393
+ readonly showBuiltInDirectives: {
7394
+ readonly type: "boolean";
7395
+ };
7367
7396
  };
7368
7397
  readonly additionalProperties: false;
7369
7398
  };
@@ -9815,6 +9844,9 @@ export declare const productConfigOverrideSchema: {
9815
9844
  readonly excludeFromSearch: {
9816
9845
  readonly type: "boolean";
9817
9846
  };
9847
+ readonly showSchemaCatalogLinks: {
9848
+ readonly type: "boolean";
9849
+ };
9818
9850
  };
9819
9851
  readonly type: "object";
9820
9852
  readonly additionalProperties: false;
@@ -12520,6 +12552,9 @@ export declare const productConfigOverrideSchema: {
12520
12552
  readonly excludeFromSearch: {
12521
12553
  readonly type: "boolean";
12522
12554
  };
12555
+ readonly showSchemaCatalogLinks: {
12556
+ readonly type: "boolean";
12557
+ };
12523
12558
  };
12524
12559
  readonly type: "object";
12525
12560
  readonly additionalProperties: false;
@@ -443,6 +443,9 @@ export declare const redocConfigSchema: {
443
443
  readonly excludeFromSearch: {
444
444
  readonly type: "boolean";
445
445
  };
446
+ readonly showSchemaCatalogLinks: {
447
+ readonly type: "boolean";
448
+ };
446
449
  };
447
450
  readonly additionalProperties: false;
448
451
  };
@@ -113,6 +113,7 @@ exports.redocConfigSchema = {
113
113
  },
114
114
  hidePropertiesPrefix: { type: 'boolean' },
115
115
  excludeFromSearch: { type: 'boolean' },
116
+ showSchemaCatalogLinks: { type: 'boolean' },
116
117
  },
117
118
  additionalProperties: false,
118
119
  };
@@ -28,7 +28,7 @@ export declare const reuniteConfigSchema: {
28
28
  readonly properties: {
29
29
  readonly path: {
30
30
  readonly type: "string";
31
- readonly pattern: "^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$";
31
+ readonly pattern: "^(?!\\/|\\.\\./)";
32
32
  };
33
33
  readonly agent: {
34
34
  readonly type: "string";
@@ -71,7 +71,7 @@ exports.reuniteConfigSchema = {
71
71
  properties: {
72
72
  path: {
73
73
  type: 'string',
74
- pattern: '^(?!\\.\\./)(/[a-zA-Z0-9_\\-\\./]+|./[a-zA-Z0-9_\\-\\./]+|[a-zA-Z0-9_\\-\\./]+)$',
74
+ pattern: '^(?!\\/|\\.\\./)',
75
75
  },
76
76
  agent: {
77
77
  type: 'string',