@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.
- 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 +16 -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 +16 -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 -587
- 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 -584
- 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,584 +0,0 @@
|
|
|
1
|
-
import { DEFAULT_TEAM_CLAIM_NAME, AuthProviderType, ApigeeDevOnboardingIntegrationAuthType, } from './constants/shared';
|
|
2
|
-
import { CONFIG_NODE_TYPE_NAMES } from './constants/config';
|
|
3
|
-
import { themeConfigSchema } from './default-theme-config-schema';
|
|
4
|
-
import { feedbackConfigSchema } from './feedback-config-schema';
|
|
5
|
-
import { graphqlConfigSchema } from './graphql-config-schema';
|
|
6
|
-
import { removePropertyRecursively } from './remove-property-recursively';
|
|
7
|
-
import { reuniteConfigSchema } from './reunite-config-schema';
|
|
8
|
-
import { analyticsConfigSchema, breadcrumbsConfigSchema, catalogsConfigSchema, codeSnippetConfigSchema, colorModeConfigSchema, paletteConfigSchema, footerConfigSchema, linksConfigSchema, logoConfigSchema, markdownConfigSchema, navbarConfigSchema, navigationConfigSchema, openapiConfigSchema, productsConfigSchema, scorecardConfigSchema, scriptsConfigSchema, searchConfigSchema, aiAssistantSchema, sidebarConfigSchema, userMenuConfigSchema, versionPickerConfigSchema, } from './ex-theme-config-schemas';
|
|
9
|
-
import { entitiesCatalogConfigSchema } from './entities-catalog-config-schema';
|
|
10
|
-
import { scorecardsConfigSchema } from './scorecards-config-schema';
|
|
11
|
-
import { configGovernanceSchema } from './common';
|
|
12
|
-
export const oidcIssuerMetadataSchema = {
|
|
13
|
-
type: 'object',
|
|
14
|
-
properties: {
|
|
15
|
-
end_session_endpoint: { type: 'string' },
|
|
16
|
-
token_endpoint: { type: 'string' },
|
|
17
|
-
authorization_endpoint: { type: 'string' },
|
|
18
|
-
jwks_uri: { type: 'string' },
|
|
19
|
-
},
|
|
20
|
-
required: ['token_endpoint', 'authorization_endpoint'],
|
|
21
|
-
additionalProperties: true,
|
|
22
|
-
};
|
|
23
|
-
export const oidcProviderConfigSchema = {
|
|
24
|
-
type: 'object',
|
|
25
|
-
properties: {
|
|
26
|
-
type: { type: 'string', const: AuthProviderType.OIDC },
|
|
27
|
-
title: { type: 'string' },
|
|
28
|
-
pkce: { type: 'boolean', default: false },
|
|
29
|
-
configurationUrl: { type: 'string', minLength: 1 },
|
|
30
|
-
configuration: oidcIssuerMetadataSchema,
|
|
31
|
-
clientId: { type: 'string', minLength: 1 },
|
|
32
|
-
clientSecret: { type: 'string', minLength: 0 },
|
|
33
|
-
teamsClaimName: { type: 'string' },
|
|
34
|
-
teamsClaimMap: { type: 'object', additionalProperties: { type: 'string' } },
|
|
35
|
-
defaultTeams: { type: 'array', items: { type: 'string' } },
|
|
36
|
-
scopes: { type: 'array', items: { type: 'string' } },
|
|
37
|
-
tokenExpirationTime: { type: 'number' },
|
|
38
|
-
authorizationRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } },
|
|
39
|
-
introspectEndpoint: { type: 'string' },
|
|
40
|
-
tokenRequestCustomParams: { type: 'object', additionalProperties: { type: 'string' } },
|
|
41
|
-
audience: { type: 'array', items: { type: 'string' } },
|
|
42
|
-
},
|
|
43
|
-
required: ['type', 'clientId'],
|
|
44
|
-
oneOf: [{ required: ['configurationUrl'] }, { required: ['configuration'] }],
|
|
45
|
-
additionalProperties: false,
|
|
46
|
-
};
|
|
47
|
-
export const saml2ProviderConfigSchema = {
|
|
48
|
-
type: 'object',
|
|
49
|
-
properties: {
|
|
50
|
-
type: { type: 'string', const: AuthProviderType.SAML2 },
|
|
51
|
-
title: { type: 'string' },
|
|
52
|
-
issuerId: { type: 'string' },
|
|
53
|
-
entityId: { type: 'string' },
|
|
54
|
-
ssoUrl: { type: 'string' },
|
|
55
|
-
x509PublicCert: { type: 'string' },
|
|
56
|
-
teamsAttributeName: { type: 'string', default: DEFAULT_TEAM_CLAIM_NAME },
|
|
57
|
-
teamsAttributeMap: { type: 'object', additionalProperties: { type: 'string' } },
|
|
58
|
-
defaultTeams: { type: 'array', items: { type: 'string' } },
|
|
59
|
-
},
|
|
60
|
-
additionalProperties: false,
|
|
61
|
-
required: ['type', 'issuerId', 'ssoUrl', 'x509PublicCert'],
|
|
62
|
-
};
|
|
63
|
-
export const authProviderConfigSchema = {
|
|
64
|
-
oneOf: [oidcProviderConfigSchema, saml2ProviderConfigSchema],
|
|
65
|
-
discriminator: { propertyName: 'type' },
|
|
66
|
-
};
|
|
67
|
-
export const ssoDirectConfigSchema = {
|
|
68
|
-
type: 'object',
|
|
69
|
-
additionalProperties: authProviderConfigSchema,
|
|
70
|
-
};
|
|
71
|
-
export const ssoConfigSchema = {
|
|
72
|
-
oneOf: [
|
|
73
|
-
{
|
|
74
|
-
type: 'array',
|
|
75
|
-
items: {
|
|
76
|
-
type: 'string',
|
|
77
|
-
enum: ['REDOCLY', 'CORPORATE', 'GUEST'],
|
|
78
|
-
},
|
|
79
|
-
uniqueItems: true,
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
type: 'string',
|
|
83
|
-
enum: ['REDOCLY', 'CORPORATE', 'GUEST'],
|
|
84
|
-
},
|
|
85
|
-
],
|
|
86
|
-
};
|
|
87
|
-
const requiresLoginSchema = { type: 'boolean' };
|
|
88
|
-
const logoutReturnUrlSchema = { type: 'string', pattern: '^https?://.*' };
|
|
89
|
-
const residencySchema = { type: 'string', pattern: '^https?://.*' };
|
|
90
|
-
export const redirectConfigSchema = {
|
|
91
|
-
type: 'object',
|
|
92
|
-
properties: {
|
|
93
|
-
to: { type: 'string' },
|
|
94
|
-
type: { type: 'number', default: 301 },
|
|
95
|
-
},
|
|
96
|
-
additionalProperties: false,
|
|
97
|
-
nodeTypeName: CONFIG_NODE_TYPE_NAMES.RedirectSource,
|
|
98
|
-
description: 'Source is an absolute path that must start with a forward slash.',
|
|
99
|
-
documentationLink: 'https://redocly.com/docs/realm/config/redirects#sources-map',
|
|
100
|
-
};
|
|
101
|
-
export const redirectsConfigSchema = {
|
|
102
|
-
type: 'object',
|
|
103
|
-
additionalProperties: redirectConfigSchema,
|
|
104
|
-
default: {},
|
|
105
|
-
nodeTypeName: CONFIG_NODE_TYPE_NAMES.Redirects,
|
|
106
|
-
description: 'Use redirects to change which resource a URL points to, maintaining working links when you move, rename, or restructure content.',
|
|
107
|
-
documentationLink: 'https://redocly.com/docs/realm/config/redirects',
|
|
108
|
-
};
|
|
109
|
-
export const bannerColorSchema = {
|
|
110
|
-
type: 'string',
|
|
111
|
-
enum: ['info', 'success', 'warning', 'error'],
|
|
112
|
-
default: 'info',
|
|
113
|
-
};
|
|
114
|
-
export const rbacScopeItemsSchema = {
|
|
115
|
-
type: 'object',
|
|
116
|
-
additionalProperties: { type: 'string' },
|
|
117
|
-
};
|
|
118
|
-
export const bannerConfigSchema = {
|
|
119
|
-
type: 'object',
|
|
120
|
-
properties: {
|
|
121
|
-
content: { type: 'string' },
|
|
122
|
-
dismissible: { type: 'boolean', default: false },
|
|
123
|
-
target: { type: 'string' },
|
|
124
|
-
color: bannerColorSchema,
|
|
125
|
-
rbac: rbacScopeItemsSchema,
|
|
126
|
-
},
|
|
127
|
-
required: ['content'],
|
|
128
|
-
additionalProperties: false,
|
|
129
|
-
};
|
|
130
|
-
export const bannersConfigSchema = {
|
|
131
|
-
type: 'array',
|
|
132
|
-
items: bannerConfigSchema,
|
|
133
|
-
default: [],
|
|
134
|
-
};
|
|
135
|
-
export const apiConfigSchema = {
|
|
136
|
-
type: 'object',
|
|
137
|
-
properties: Object.assign({ root: { type: 'string' }, output: { type: 'string', pattern: '(.ya?ml|.json)$' }, rbac: rbacScopeItemsSchema, openapi: openapiConfigSchema, graphql: graphqlConfigSchema,
|
|
138
|
-
/**
|
|
139
|
-
* @deprecated left for backwards compatibility
|
|
140
|
-
*/
|
|
141
|
-
theme: {
|
|
142
|
-
type: 'object',
|
|
143
|
-
properties: {
|
|
144
|
-
openapi: openapiConfigSchema,
|
|
145
|
-
graphql: graphqlConfigSchema,
|
|
146
|
-
},
|
|
147
|
-
additionalProperties: false,
|
|
148
|
-
}, title: { type: 'string' }, metadata: { type: 'object', additionalProperties: true } }, configGovernanceSchema),
|
|
149
|
-
required: ['root'],
|
|
150
|
-
};
|
|
151
|
-
const metadataConfigSchema = {
|
|
152
|
-
type: 'object',
|
|
153
|
-
additionalProperties: true,
|
|
154
|
-
};
|
|
155
|
-
const metadataGlobsConfigSchema = {
|
|
156
|
-
type: 'object',
|
|
157
|
-
additionalProperties: {
|
|
158
|
-
type: 'object',
|
|
159
|
-
additionalProperties: true,
|
|
160
|
-
},
|
|
161
|
-
};
|
|
162
|
-
const llmstxtConfigSchema = {
|
|
163
|
-
type: 'object',
|
|
164
|
-
properties: {
|
|
165
|
-
hide: {
|
|
166
|
-
type: 'boolean',
|
|
167
|
-
default: false,
|
|
168
|
-
},
|
|
169
|
-
title: {
|
|
170
|
-
type: 'string',
|
|
171
|
-
},
|
|
172
|
-
description: {
|
|
173
|
-
type: 'string',
|
|
174
|
-
},
|
|
175
|
-
details: {
|
|
176
|
-
type: 'object',
|
|
177
|
-
properties: {
|
|
178
|
-
path: {
|
|
179
|
-
type: 'string',
|
|
180
|
-
},
|
|
181
|
-
content: {
|
|
182
|
-
type: 'string',
|
|
183
|
-
},
|
|
184
|
-
},
|
|
185
|
-
additionalProperties: false,
|
|
186
|
-
},
|
|
187
|
-
excludeFiles: {
|
|
188
|
-
type: 'array',
|
|
189
|
-
items: { type: 'string' },
|
|
190
|
-
default: [],
|
|
191
|
-
},
|
|
192
|
-
sections: {
|
|
193
|
-
type: 'array',
|
|
194
|
-
items: {
|
|
195
|
-
type: 'object',
|
|
196
|
-
properties: {
|
|
197
|
-
title: { type: 'string' },
|
|
198
|
-
description: { type: 'string' },
|
|
199
|
-
includeFiles: {
|
|
200
|
-
type: 'array',
|
|
201
|
-
items: { type: 'string' },
|
|
202
|
-
default: [],
|
|
203
|
-
},
|
|
204
|
-
excludeFiles: {
|
|
205
|
-
type: 'array',
|
|
206
|
-
items: { type: 'string' },
|
|
207
|
-
default: [],
|
|
208
|
-
},
|
|
209
|
-
},
|
|
210
|
-
required: ['title'],
|
|
211
|
-
additionalProperties: false,
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
default: {
|
|
216
|
-
hide: false,
|
|
217
|
-
title: undefined,
|
|
218
|
-
description: undefined,
|
|
219
|
-
details: undefined,
|
|
220
|
-
sections: [
|
|
221
|
-
{
|
|
222
|
-
title: 'Table of contents',
|
|
223
|
-
includeFiles: ['**/*'],
|
|
224
|
-
excludeFiles: [],
|
|
225
|
-
},
|
|
226
|
-
],
|
|
227
|
-
},
|
|
228
|
-
additionalProperties: false,
|
|
229
|
-
};
|
|
230
|
-
export const seoConfigSchema = {
|
|
231
|
-
type: 'object',
|
|
232
|
-
properties: {
|
|
233
|
-
title: { type: 'string' },
|
|
234
|
-
projectTitle: { type: 'string' },
|
|
235
|
-
description: { type: 'string' },
|
|
236
|
-
siteUrl: { type: 'string' },
|
|
237
|
-
image: { type: 'string' },
|
|
238
|
-
keywords: {
|
|
239
|
-
oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
|
|
240
|
-
},
|
|
241
|
-
lang: { type: 'string' },
|
|
242
|
-
jsonLd: { type: 'object' },
|
|
243
|
-
meta: {
|
|
244
|
-
type: 'array',
|
|
245
|
-
items: {
|
|
246
|
-
type: 'object',
|
|
247
|
-
properties: {
|
|
248
|
-
name: { type: 'string' },
|
|
249
|
-
content: { type: 'string' },
|
|
250
|
-
},
|
|
251
|
-
required: ['name', 'content'],
|
|
252
|
-
additionalProperties: false,
|
|
253
|
-
},
|
|
254
|
-
},
|
|
255
|
-
llmstxt: llmstxtConfigSchema,
|
|
256
|
-
},
|
|
257
|
-
default: {
|
|
258
|
-
llmstxt: llmstxtConfigSchema.default,
|
|
259
|
-
},
|
|
260
|
-
additionalProperties: false,
|
|
261
|
-
};
|
|
262
|
-
export const apiFunctionsConfigSchema = {
|
|
263
|
-
type: 'object',
|
|
264
|
-
properties: {
|
|
265
|
-
folders: { type: 'array', items: { type: 'string' } },
|
|
266
|
-
},
|
|
267
|
-
additionalProperties: false,
|
|
268
|
-
};
|
|
269
|
-
export const rbacEntitiesCatalogConfigSchema = {
|
|
270
|
-
type: 'object',
|
|
271
|
-
properties: {
|
|
272
|
-
catalogs: {
|
|
273
|
-
type: 'object',
|
|
274
|
-
properties: {
|
|
275
|
-
all: rbacScopeItemsSchema,
|
|
276
|
-
services: rbacScopeItemsSchema,
|
|
277
|
-
domains: rbacScopeItemsSchema,
|
|
278
|
-
teams: rbacScopeItemsSchema,
|
|
279
|
-
users: rbacScopeItemsSchema,
|
|
280
|
-
apiDescriptions: rbacScopeItemsSchema,
|
|
281
|
-
dataSchemas: rbacScopeItemsSchema,
|
|
282
|
-
apiOperations: rbacScopeItemsSchema,
|
|
283
|
-
},
|
|
284
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
285
|
-
},
|
|
286
|
-
entitiesTypes: {
|
|
287
|
-
type: 'object',
|
|
288
|
-
properties: {
|
|
289
|
-
service: rbacScopeItemsSchema,
|
|
290
|
-
domain: rbacScopeItemsSchema,
|
|
291
|
-
team: rbacScopeItemsSchema,
|
|
292
|
-
user: rbacScopeItemsSchema,
|
|
293
|
-
apiDescription: rbacScopeItemsSchema,
|
|
294
|
-
apiOperation: rbacScopeItemsSchema,
|
|
295
|
-
dataSchema: rbacScopeItemsSchema,
|
|
296
|
-
},
|
|
297
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
298
|
-
},
|
|
299
|
-
entitiesGroups: {
|
|
300
|
-
type: 'array',
|
|
301
|
-
items: {
|
|
302
|
-
type: 'object',
|
|
303
|
-
properties: {
|
|
304
|
-
entities: { type: 'array', items: { type: 'string' } },
|
|
305
|
-
config: rbacScopeItemsSchema,
|
|
306
|
-
},
|
|
307
|
-
additionalProperties: false,
|
|
308
|
-
},
|
|
309
|
-
},
|
|
310
|
-
entities: {
|
|
311
|
-
type: 'object',
|
|
312
|
-
properties: {
|
|
313
|
-
'**': rbacScopeItemsSchema,
|
|
314
|
-
},
|
|
315
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
316
|
-
},
|
|
317
|
-
},
|
|
318
|
-
additionalProperties: false,
|
|
319
|
-
};
|
|
320
|
-
export const rbacConfigSchema = {
|
|
321
|
-
type: 'object',
|
|
322
|
-
properties: {
|
|
323
|
-
teamNamePatterns: { type: 'array', items: { type: 'string' } },
|
|
324
|
-
teamFolders: { type: 'array', items: { type: 'string' } },
|
|
325
|
-
teamFoldersBaseRoles: rbacScopeItemsSchema,
|
|
326
|
-
cms: rbacScopeItemsSchema, // deprecated in favor of reunite
|
|
327
|
-
reunite: rbacScopeItemsSchema,
|
|
328
|
-
features: {
|
|
329
|
-
type: 'object',
|
|
330
|
-
properties: {
|
|
331
|
-
aiSearch: rbacScopeItemsSchema,
|
|
332
|
-
},
|
|
333
|
-
additionalProperties: false,
|
|
334
|
-
},
|
|
335
|
-
content: {
|
|
336
|
-
type: 'object',
|
|
337
|
-
properties: {
|
|
338
|
-
'**': rbacScopeItemsSchema,
|
|
339
|
-
},
|
|
340
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
341
|
-
},
|
|
342
|
-
entitiesCatalog: rbacEntitiesCatalogConfigSchema,
|
|
343
|
-
},
|
|
344
|
-
additionalProperties: rbacScopeItemsSchema,
|
|
345
|
-
};
|
|
346
|
-
export const graviteeAdapterAuthStaticSchema = {
|
|
347
|
-
type: 'object',
|
|
348
|
-
properties: { static: { type: 'string' } },
|
|
349
|
-
additionalProperties: false,
|
|
350
|
-
required: ['static'],
|
|
351
|
-
};
|
|
352
|
-
export const graviteeAdapterAuthIdpSchema = {
|
|
353
|
-
type: 'object',
|
|
354
|
-
properties: { idp: { type: 'string' } },
|
|
355
|
-
additionalProperties: false,
|
|
356
|
-
required: ['idp'],
|
|
357
|
-
};
|
|
358
|
-
export const graviteeAdapterConfigSchema = {
|
|
359
|
-
type: 'object',
|
|
360
|
-
properties: {
|
|
361
|
-
type: { type: 'string', const: 'GRAVITEE' },
|
|
362
|
-
apiBaseUrl: { type: 'string' },
|
|
363
|
-
env: { type: 'string' },
|
|
364
|
-
allowApiProductsOutsideCatalog: { type: 'boolean', default: false },
|
|
365
|
-
stage: { type: 'string', default: 'non-production' },
|
|
366
|
-
auth: {
|
|
367
|
-
oneOf: [graviteeAdapterAuthStaticSchema, graviteeAdapterAuthIdpSchema],
|
|
368
|
-
},
|
|
369
|
-
},
|
|
370
|
-
additionalProperties: false,
|
|
371
|
-
required: ['type', 'apiBaseUrl'],
|
|
372
|
-
};
|
|
373
|
-
export const apigeeAdapterAuthOauth2Schema = {
|
|
374
|
-
type: 'object',
|
|
375
|
-
properties: {
|
|
376
|
-
type: { type: 'string', const: ApigeeDevOnboardingIntegrationAuthType.OAUTH2 },
|
|
377
|
-
tokenEndpoint: { type: 'string' },
|
|
378
|
-
clientId: { type: 'string' },
|
|
379
|
-
clientSecret: { type: 'string' },
|
|
380
|
-
},
|
|
381
|
-
additionalProperties: false,
|
|
382
|
-
required: ['type', 'tokenEndpoint', 'clientId', 'clientSecret'],
|
|
383
|
-
};
|
|
384
|
-
export const apigeeAdapterAuthServiceAccountSchema = {
|
|
385
|
-
type: 'object',
|
|
386
|
-
properties: {
|
|
387
|
-
type: { type: 'string', const: ApigeeDevOnboardingIntegrationAuthType.SERVICE_ACCOUNT },
|
|
388
|
-
serviceAccountEmail: { type: 'string' },
|
|
389
|
-
serviceAccountPrivateKey: { type: 'string' },
|
|
390
|
-
},
|
|
391
|
-
additionalProperties: false,
|
|
392
|
-
required: ['type', 'serviceAccountEmail', 'serviceAccountPrivateKey'],
|
|
393
|
-
};
|
|
394
|
-
export const apigeeXAdapterConfigSchema = {
|
|
395
|
-
type: 'object',
|
|
396
|
-
properties: {
|
|
397
|
-
type: { type: 'string', const: 'APIGEE_X' },
|
|
398
|
-
apiUrl: { type: 'string' },
|
|
399
|
-
stage: { type: 'string', default: 'non-production' },
|
|
400
|
-
organizationName: { type: 'string' },
|
|
401
|
-
ignoreApiProducts: { type: 'array', items: { type: 'string' } },
|
|
402
|
-
allowApiProductsOutsideCatalog: { type: 'boolean', default: false },
|
|
403
|
-
auth: {
|
|
404
|
-
type: 'object',
|
|
405
|
-
oneOf: [apigeeAdapterAuthOauth2Schema, apigeeAdapterAuthServiceAccountSchema],
|
|
406
|
-
discriminator: { propertyName: 'type' },
|
|
407
|
-
},
|
|
408
|
-
},
|
|
409
|
-
additionalProperties: false,
|
|
410
|
-
required: ['type', 'organizationName', 'auth'],
|
|
411
|
-
};
|
|
412
|
-
export const apigeeEdgeAdapterConfigSchema = Object.assign(Object.assign({}, apigeeXAdapterConfigSchema), { properties: Object.assign(Object.assign({}, apigeeXAdapterConfigSchema.properties), { type: { type: 'string', const: 'APIGEE_EDGE' } }) });
|
|
413
|
-
export const devOnboardingAdapterConfigSchema = {
|
|
414
|
-
type: 'object',
|
|
415
|
-
oneOf: [apigeeXAdapterConfigSchema, apigeeEdgeAdapterConfigSchema, graviteeAdapterConfigSchema],
|
|
416
|
-
discriminator: { propertyName: 'type' },
|
|
417
|
-
};
|
|
418
|
-
const devOnboardingConfigSchema = {
|
|
419
|
-
type: 'object',
|
|
420
|
-
required: ['adapters'],
|
|
421
|
-
additionalProperties: false,
|
|
422
|
-
properties: {
|
|
423
|
-
adapters: {
|
|
424
|
-
type: 'array',
|
|
425
|
-
items: devOnboardingAdapterConfigSchema,
|
|
426
|
-
},
|
|
427
|
-
},
|
|
428
|
-
};
|
|
429
|
-
export const l10nConfigSchema = {
|
|
430
|
-
type: 'object',
|
|
431
|
-
properties: {
|
|
432
|
-
defaultLocale: {
|
|
433
|
-
type: 'string',
|
|
434
|
-
},
|
|
435
|
-
locales: {
|
|
436
|
-
type: 'array',
|
|
437
|
-
items: {
|
|
438
|
-
type: 'object',
|
|
439
|
-
properties: {
|
|
440
|
-
code: {
|
|
441
|
-
type: 'string',
|
|
442
|
-
},
|
|
443
|
-
name: {
|
|
444
|
-
type: 'string',
|
|
445
|
-
},
|
|
446
|
-
},
|
|
447
|
-
required: ['code'],
|
|
448
|
-
},
|
|
449
|
-
},
|
|
450
|
-
},
|
|
451
|
-
additionalProperties: false,
|
|
452
|
-
required: ['defaultLocale'],
|
|
453
|
-
};
|
|
454
|
-
const responseHeaderSchema = {
|
|
455
|
-
type: 'object',
|
|
456
|
-
properties: {
|
|
457
|
-
name: { type: 'string' },
|
|
458
|
-
value: { type: 'string' },
|
|
459
|
-
},
|
|
460
|
-
additionalProperties: false,
|
|
461
|
-
required: ['name', 'value'],
|
|
462
|
-
};
|
|
463
|
-
const mcpConfigSchema = {
|
|
464
|
-
type: 'object',
|
|
465
|
-
properties: {
|
|
466
|
-
hide: { type: 'boolean', default: false },
|
|
467
|
-
docs: {
|
|
468
|
-
type: 'object',
|
|
469
|
-
properties: {
|
|
470
|
-
hide: { type: 'boolean', default: false },
|
|
471
|
-
name: { type: 'string', default: 'Docs MCP server' },
|
|
472
|
-
ignore: {
|
|
473
|
-
type: 'array',
|
|
474
|
-
items: { type: 'string' },
|
|
475
|
-
default: [],
|
|
476
|
-
},
|
|
477
|
-
},
|
|
478
|
-
additionalProperties: false,
|
|
479
|
-
},
|
|
480
|
-
},
|
|
481
|
-
additionalProperties: false,
|
|
482
|
-
default: {
|
|
483
|
-
hide: false,
|
|
484
|
-
docs: {
|
|
485
|
-
hide: false,
|
|
486
|
-
name: 'MCP server',
|
|
487
|
-
ignore: [],
|
|
488
|
-
},
|
|
489
|
-
},
|
|
490
|
-
};
|
|
491
|
-
export const accessConfigSchema = {
|
|
492
|
-
type: 'object',
|
|
493
|
-
properties: {
|
|
494
|
-
requiresLogin: requiresLoginSchema,
|
|
495
|
-
logoutReturnUrl: logoutReturnUrlSchema,
|
|
496
|
-
residency: residencySchema,
|
|
497
|
-
sso: ssoConfigSchema,
|
|
498
|
-
rbac: rbacConfigSchema,
|
|
499
|
-
},
|
|
500
|
-
additionalProperties: false,
|
|
501
|
-
};
|
|
502
|
-
export const redoclyConfigSchema = {
|
|
503
|
-
type: 'object',
|
|
504
|
-
properties: Object.assign(Object.assign({
|
|
505
|
-
/**
|
|
506
|
-
* @deprecated Should use `plugins` instead
|
|
507
|
-
*/
|
|
508
|
-
imports: {
|
|
509
|
-
type: 'array',
|
|
510
|
-
items: { type: 'string' },
|
|
511
|
-
}, licenseKey: { type: 'string' }, redirects: redirectsConfigSchema, seo: seoConfigSchema,
|
|
512
|
-
/**
|
|
513
|
-
* @deprecated Should use `access.rbac` instead
|
|
514
|
-
*/
|
|
515
|
-
rbac: rbacConfigSchema, apiFunctions: apiFunctionsConfigSchema,
|
|
516
|
-
/**
|
|
517
|
-
* @deprecated Should use `access.requiresLogin` instead
|
|
518
|
-
*/
|
|
519
|
-
requiresLogin: requiresLoginSchema, responseHeaders: {
|
|
520
|
-
type: 'object',
|
|
521
|
-
additionalProperties: {
|
|
522
|
-
type: 'array',
|
|
523
|
-
items: responseHeaderSchema,
|
|
524
|
-
},
|
|
525
|
-
}, mockServer: {
|
|
526
|
-
type: 'object',
|
|
527
|
-
properties: {
|
|
528
|
-
off: { type: 'boolean', default: false },
|
|
529
|
-
position: { type: 'string', enum: ['first', 'last', 'replace', 'off'], default: 'first' },
|
|
530
|
-
strictExamples: { type: 'boolean', default: false },
|
|
531
|
-
errorIfForcedExampleNotFound: { type: 'boolean', default: false },
|
|
532
|
-
description: { type: 'string' },
|
|
533
|
-
},
|
|
534
|
-
}, apis: {
|
|
535
|
-
type: 'object',
|
|
536
|
-
additionalProperties: apiConfigSchema,
|
|
537
|
-
} }, configGovernanceSchema), { ssoDirect: ssoDirectConfigSchema,
|
|
538
|
-
/**
|
|
539
|
-
* @deprecated Should use `access.sso` instead
|
|
540
|
-
*/
|
|
541
|
-
sso: ssoConfigSchema,
|
|
542
|
-
/**
|
|
543
|
-
* @deprecated Should use `access.residency` instead
|
|
544
|
-
*/
|
|
545
|
-
residency: residencySchema,
|
|
546
|
-
/**
|
|
547
|
-
* @deprecated Should use `access.logoutReturnUrl` instead
|
|
548
|
-
*/
|
|
549
|
-
logoutReturnUrl: logoutReturnUrlSchema, access: accessConfigSchema, developerOnboarding: devOnboardingConfigSchema, removeAttribution: { type: 'boolean' }, i18n: l10nConfigSchema, l10n: l10nConfigSchema, metadata: metadataConfigSchema, metadataGlobs: metadataGlobsConfigSchema, ignore: { type: 'array', items: { type: 'string' } },
|
|
550
|
-
/**
|
|
551
|
-
* @deprecated properties moved to the root of the config
|
|
552
|
-
*/
|
|
553
|
-
theme: themeConfigSchema, reunite: reuniteConfigSchema,
|
|
554
|
-
// Ex theme properties
|
|
555
|
-
logo: logoConfigSchema, navbar: navbarConfigSchema, products: productsConfigSchema, footer: footerConfigSchema, sidebar: sidebarConfigSchema, scripts: scriptsConfigSchema, links: linksConfigSchema, feedback: feedbackConfigSchema, search: searchConfigSchema, aiAssistant: aiAssistantSchema, colorMode: colorModeConfigSchema, palette: paletteConfigSchema, navigation: navigationConfigSchema, codeSnippet: codeSnippetConfigSchema, markdown: markdownConfigSchema, openapi: openapiConfigSchema, graphql: graphqlConfigSchema, analytics: analyticsConfigSchema, userMenu: userMenuConfigSchema, versionPicker: versionPickerConfigSchema, breadcrumbs: breadcrumbsConfigSchema,
|
|
556
|
-
/**
|
|
557
|
-
* @deprecated Should use `catalogClassic` instead
|
|
558
|
-
*/
|
|
559
|
-
catalog: catalogsConfigSchema, entitiesCatalog: entitiesCatalogConfigSchema, catalogClassic: catalogsConfigSchema,
|
|
560
|
-
/**
|
|
561
|
-
* @deprecated Should use `scorecardClassic` instead
|
|
562
|
-
*/
|
|
563
|
-
scorecard: scorecardConfigSchema, scorecardClassic: scorecardConfigSchema, scorecards: scorecardsConfigSchema, mcp: mcpConfigSchema, corsProxy: {
|
|
564
|
-
type: 'object',
|
|
565
|
-
properties: {
|
|
566
|
-
allowedTargets: {
|
|
567
|
-
type: 'array',
|
|
568
|
-
items: { type: 'string' },
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
additionalProperties: false,
|
|
572
|
-
}, banner: bannersConfigSchema }),
|
|
573
|
-
default: { redirects: {}, seo: seoConfigSchema.default },
|
|
574
|
-
additionalProperties: true,
|
|
575
|
-
};
|
|
576
|
-
const environmentSchema = Object.assign(Object.assign({}, removePropertyRecursively(redoclyConfigSchema, 'default')), { additionalProperties: false });
|
|
577
|
-
export const rootRedoclyConfigSchema = Object.assign(Object.assign({ $id: 'root-redocly-config' }, redoclyConfigSchema), { properties: Object.assign(Object.assign({ plugins: {
|
|
578
|
-
type: 'array',
|
|
579
|
-
items: { type: 'string' },
|
|
580
|
-
} }, redoclyConfigSchema.properties), { env: {
|
|
581
|
-
type: 'object',
|
|
582
|
-
additionalProperties: environmentSchema, // TODO: if we want full validation we need to override apis, theme and the root
|
|
583
|
-
} }), default: {}, additionalProperties: false });
|
|
584
|
-
//# sourceMappingURL=root-config-schema.js.map
|