@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.
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 +1 -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 +1 -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 -588
  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 -585
  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,283 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.entityFileDefaultSchema = 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 entities_1 = require("./constants/entities");
5
- exports.userMetadataSchema = {
6
- type: 'object',
7
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.UserEntityMetadata,
8
- properties: {
9
- email: {
10
- type: 'string',
11
- description: 'Email of the user',
12
- },
13
- },
14
- required: ['email'],
15
- additionalProperties: true,
16
- };
17
- exports.apiDescriptionMetadataSchema = {
18
- type: 'object',
19
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.ApiDescriptionEntityMetadata,
20
- properties: {
21
- specType: {
22
- type: 'string',
23
- enum: ['jsonschema', 'openapi', 'asyncapi', 'avro', 'zod', 'graphql', 'protobuf', 'arazzo'],
24
- description: 'Type of the API description',
25
- },
26
- descriptionFile: {
27
- type: 'string',
28
- description: 'Path to the file containing the API description',
29
- },
30
- },
31
- required: ['specType', 'descriptionFile'],
32
- additionalProperties: true,
33
- };
34
- exports.apiOperationMetadataSchema = {
35
- type: 'object',
36
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.ApiOperationEntityMetadata,
37
- properties: {
38
- method: {
39
- type: 'string',
40
- enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'MUTATION', 'QUERY', 'SUBSCRIBE', 'PUBLISH'],
41
- description: 'HTTP method of the API operation',
42
- },
43
- path: {
44
- type: 'string',
45
- description: 'Path of the API operation',
46
- },
47
- payload: {
48
- type: 'array',
49
- items: {
50
- type: 'string',
51
- description: 'Related dataSchema name',
52
- },
53
- },
54
- responses: {
55
- type: 'array',
56
- items: {
57
- type: 'string',
58
- description: 'Related dataSchema name',
59
- },
60
- },
61
- },
62
- required: ['method', 'path'],
63
- additionalProperties: true,
64
- };
65
- exports.dataSchemaMetadataSchema = {
66
- type: 'object',
67
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.DataSchemaEntityMetadata,
68
- properties: {
69
- specType: {
70
- type: 'string',
71
- enum: ['jsonschema', 'openapi', 'asyncapi', 'avro', 'zod', 'graphql', 'protobuf', 'arazzo'],
72
- description: 'Specification type of the data schema',
73
- },
74
- schema: {
75
- type: 'string',
76
- description: 'Inline schema of the data structure',
77
- },
78
- sdl: {
79
- type: 'string',
80
- description: 'SDL of the data structure',
81
- },
82
- },
83
- required: ['specType'],
84
- additionalProperties: true,
85
- };
86
- exports.defaultMetadataSchema = {
87
- type: 'object',
88
- properties: {},
89
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntityMetadata,
90
- additionalProperties: true,
91
- };
92
- exports.slackChannelFileSchema = {
93
- type: 'object',
94
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntitySlackChannel,
95
- properties: {
96
- name: {
97
- type: 'string',
98
- minLength: 2,
99
- maxLength: 150,
100
- },
101
- url: {
102
- type: 'string',
103
- },
104
- },
105
- required: ['name'],
106
- additionalProperties: false,
107
- };
108
- exports.slackContactFileSchema = {
109
- type: 'object',
110
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntitySlackContact,
111
- properties: {
112
- channels: {
113
- type: 'array',
114
- items: exports.slackChannelFileSchema,
115
- },
116
- },
117
- required: ['channels'],
118
- additionalProperties: false,
119
- };
120
- exports.entityContactFileSchema = {
121
- type: 'object',
122
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntityContact,
123
- properties: {
124
- slack: exports.slackContactFileSchema,
125
- },
126
- additionalProperties: false,
127
- };
128
- exports.entityLinkFileSchema = {
129
- type: 'object',
130
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntityLink,
131
- properties: {
132
- label: {
133
- type: 'string',
134
- minLength: 2,
135
- maxLength: 150,
136
- },
137
- url: {
138
- type: 'string',
139
- },
140
- },
141
- required: ['label', 'url'],
142
- additionalProperties: false,
143
- };
144
- exports.entityRelationFileSchema = {
145
- type: 'object',
146
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntityRelation,
147
- properties: {
148
- type: {
149
- type: 'string',
150
- enum: entities_1.ENTITY_RELATION_TYPES,
151
- },
152
- key: {
153
- type: 'string',
154
- minLength: 2,
155
- maxLength: 100,
156
- },
157
- version: {
158
- type: 'string',
159
- },
160
- revision: {
161
- type: 'string',
162
- },
163
- },
164
- required: ['type', 'key'],
165
- additionalProperties: false,
166
- };
167
- // Base entity schema properties
168
- exports.entityBaseProperties = {
169
- version: {
170
- type: 'string',
171
- },
172
- key: {
173
- type: 'string',
174
- pattern: '^[a-z0-9]+(?:-[a-z0-9]+)*$',
175
- minLength: 2,
176
- maxLength: 150,
177
- },
178
- type: {
179
- type: 'string',
180
- enum: ['user', 'data-schema', 'api-operation', 'api-description', 'service', 'domain', 'team'],
181
- },
182
- title: {
183
- type: 'string',
184
- minLength: 2,
185
- maxLength: 200,
186
- },
187
- summary: {
188
- type: 'string',
189
- minLength: 1,
190
- maxLength: 500,
191
- },
192
- tags: {
193
- type: 'array',
194
- items: {
195
- type: 'string',
196
- minLength: 1,
197
- maxLength: 50,
198
- },
199
- },
200
- git: {
201
- type: 'array',
202
- items: {
203
- type: 'string',
204
- },
205
- },
206
- contact: exports.entityContactFileSchema,
207
- links: {
208
- type: 'array',
209
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntityLinkList,
210
- items: exports.entityLinkFileSchema,
211
- },
212
- relations: {
213
- type: 'array',
214
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.EntityRelationList,
215
- items: exports.entityRelationFileSchema,
216
- },
217
- metadata: exports.defaultMetadataSchema,
218
- };
219
- exports.entityFileSchema = {
220
- type: 'object',
221
- discriminator: {
222
- propertyName: 'type',
223
- },
224
- oneOf: [
225
- {
226
- type: 'object',
227
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'user' }, metadata: exports.userMetadataSchema }),
228
- required: ['key', 'title', 'type', 'metadata'],
229
- additionalProperties: false,
230
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.UserEntity,
231
- },
232
- {
233
- type: 'object',
234
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.ApiOperationEntity,
235
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'api-operation' }, metadata: exports.apiOperationMetadataSchema }),
236
- required: ['key', 'title', 'type', 'metadata'],
237
- additionalProperties: false,
238
- },
239
- {
240
- type: 'object',
241
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.DataSchemaEntity,
242
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'data-schema' }, metadata: exports.dataSchemaMetadataSchema }),
243
- required: ['key', 'title', 'type', 'metadata'],
244
- additionalProperties: false,
245
- },
246
- {
247
- type: 'object',
248
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.ApiDescriptionEntity,
249
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'api-description' }, metadata: exports.apiDescriptionMetadataSchema }),
250
- required: ['key', 'title', 'type', 'metadata'],
251
- additionalProperties: false,
252
- },
253
- {
254
- type: 'object',
255
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.ServiceEntity,
256
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'service' } }),
257
- required: ['key', 'title', 'type'],
258
- additionalProperties: false,
259
- },
260
- {
261
- type: 'object',
262
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.DomainEntity,
263
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'domain' } }),
264
- required: ['key', 'title', 'type'],
265
- additionalProperties: false,
266
- },
267
- {
268
- type: 'object',
269
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.TeamEntity,
270
- properties: Object.assign(Object.assign({}, exports.entityBaseProperties), { type: { const: 'team' } }),
271
- required: ['key', 'title', 'type'],
272
- additionalProperties: false,
273
- },
274
- ],
275
- };
276
- exports.entityFileDefaultSchema = {
277
- type: 'object',
278
- nodeTypeName: entities_1.ENTITY_NODE_TYPE_NAMES.Entity,
279
- properties: Object.assign({}, exports.entityBaseProperties),
280
- required: ['key', 'title', 'type'],
281
- additionalProperties: false,
282
- };
283
- //# sourceMappingURL=entities-catalog-entity-file-schema.js.map