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