@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,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.feedbackConfigSchema = exports.optionalEmailSettings = exports.reasonsSettings = void 0;
4
- const reasonsBaseProperties = {
5
- hide: {
6
- type: 'boolean',
7
- default: false,
8
- },
9
- component: {
10
- type: 'string',
11
- enum: ['radio', 'checkbox'],
12
- default: 'checkbox',
13
- },
14
- label: { type: 'string' },
15
- items: { type: 'array', items: { type: 'string' } },
16
- };
17
- exports.reasonsSettings = {
18
- type: 'object',
19
- properties: reasonsBaseProperties,
20
- additionalProperties: false,
21
- };
22
- exports.optionalEmailSettings = {
23
- type: 'object',
24
- properties: {
25
- hide: {
26
- type: 'boolean',
27
- default: false,
28
- },
29
- label: { type: 'string' },
30
- placeholder: { type: 'string' },
31
- },
32
- additionalProperties: false,
33
- };
34
- exports.feedbackConfigSchema = {
35
- type: 'object',
36
- properties: {
37
- hide: {
38
- type: 'boolean',
39
- default: false,
40
- },
41
- type: {
42
- type: 'string',
43
- enum: ['rating', 'sentiment', 'comment', 'reasons', 'mood', 'scale'],
44
- default: 'sentiment',
45
- },
46
- settings: {
47
- type: 'object',
48
- properties: {
49
- label: { type: 'string' },
50
- submitText: { type: 'string' },
51
- buttonText: { type: 'string' },
52
- component: {
53
- type: 'string',
54
- enum: ['radio', 'checkbox'],
55
- default: 'checkbox',
56
- },
57
- items: { type: 'array', items: { type: 'string' }, minItems: 1 },
58
- leftScaleLabel: { type: 'string' },
59
- rightScaleLabel: { type: 'string' },
60
- reasons: {
61
- type: 'object',
62
- properties: Object.assign(Object.assign({}, reasonsBaseProperties), { like: exports.reasonsSettings, dislike: exports.reasonsSettings, satisfied: exports.reasonsSettings, neutral: exports.reasonsSettings, dissatisfied: exports.reasonsSettings }),
63
- additionalProperties: false,
64
- },
65
- comment: {
66
- type: 'object',
67
- properties: {
68
- hide: {
69
- type: 'boolean',
70
- default: false,
71
- },
72
- label: { type: 'string' },
73
- likeLabel: { type: 'string' },
74
- dislikeLabel: { type: 'string' },
75
- satisfiedLabel: { type: 'string' },
76
- neutralLabel: { type: 'string' },
77
- dissatisfiedLabel: { type: 'string' },
78
- },
79
- additionalProperties: false,
80
- },
81
- optionalEmail: exports.optionalEmailSettings,
82
- },
83
- additionalProperties: false,
84
- },
85
- },
86
- additionalProperties: false,
87
- };
88
- //# sourceMappingURL=feedback-config-schema.js.map
@@ -1,157 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.graphqlConfigSchema = void 0;
4
- const feedback_config_schema_1 = require("./feedback-config-schema");
5
- const redoc_config_schema_1 = require("./redoc-config-schema");
6
- const typeGroupConfig = {
7
- type: 'object',
8
- properties: {
9
- includeByName: {
10
- type: 'array',
11
- items: {
12
- type: 'string',
13
- },
14
- },
15
- excludeByName: {
16
- type: 'array',
17
- items: {
18
- type: 'string',
19
- },
20
- },
21
- },
22
- additionalProperties: false,
23
- };
24
- const menuGroupConfig = {
25
- type: 'object',
26
- properties: {
27
- name: {
28
- type: 'string',
29
- },
30
- items: typeGroupConfig,
31
- queries: typeGroupConfig,
32
- mutations: typeGroupConfig,
33
- subscriptions: typeGroupConfig,
34
- types: typeGroupConfig,
35
- directives: typeGroupConfig,
36
- },
37
- required: ['name'],
38
- additionalProperties: false,
39
- };
40
- const menuGroupingConfig = {
41
- type: 'object',
42
- properties: {
43
- requireExactGroups: {
44
- type: 'boolean',
45
- },
46
- groups: {
47
- type: 'array',
48
- items: menuGroupConfig,
49
- },
50
- otherItemsGroupName: {
51
- type: 'string',
52
- },
53
- },
54
- required: ['requireExactGroups', 'groups', 'otherItemsGroupName'],
55
- additionalProperties: false,
56
- };
57
- const graphqlContactConfigSchema = {
58
- type: 'object',
59
- properties: {
60
- name: { type: 'string' },
61
- url: { type: 'string', format: 'uri' },
62
- email: { type: 'string', format: 'email' },
63
- },
64
- additionalProperties: false,
65
- };
66
- const graphqlLicenseConfigSchema = {
67
- type: 'object',
68
- properties: {
69
- name: { type: 'string' },
70
- url: { type: 'string', format: 'uri' },
71
- identifier: { type: 'string' },
72
- },
73
- additionalProperties: false,
74
- };
75
- const graphqlInfoConfigSchema = {
76
- type: 'object',
77
- properties: {
78
- title: { type: 'string' },
79
- version: { type: 'string' },
80
- description: { type: 'string' },
81
- termsOfService: { type: 'string', format: 'uri' },
82
- contact: graphqlContactConfigSchema,
83
- license: graphqlLicenseConfigSchema,
84
- },
85
- additionalProperties: false,
86
- };
87
- exports.graphqlConfigSchema = {
88
- type: 'object',
89
- properties: {
90
- menu: {
91
- type: 'object',
92
- properties: Object.assign({}, menuGroupingConfig.properties),
93
- additionalProperties: false,
94
- },
95
- sidebar: {
96
- type: 'object',
97
- properties: {
98
- hide: {
99
- type: 'boolean',
100
- },
101
- },
102
- },
103
- downloadUrls: redoc_config_schema_1.downloadUrlsSchema,
104
- apiLogo: {
105
- type: 'object',
106
- properties: {
107
- imageUrl: {
108
- type: 'string',
109
- },
110
- href: {
111
- type: 'string',
112
- },
113
- altText: {
114
- type: 'string',
115
- },
116
- backgroundColor: {
117
- type: 'string',
118
- },
119
- },
120
- },
121
- jsonSamplesDepth: {
122
- type: 'number',
123
- },
124
- samplesMaxInlineArgs: {
125
- type: 'number',
126
- },
127
- licenseKey: {
128
- type: 'string',
129
- },
130
- fieldExpandLevel: {
131
- type: 'number',
132
- },
133
- baseUrlPath: {
134
- type: 'string',
135
- },
136
- metadata: {
137
- type: 'object',
138
- properties: {
139
- apiId: {
140
- type: 'string',
141
- },
142
- },
143
- additionalProperties: true,
144
- },
145
- feedback: feedback_config_schema_1.feedbackConfigSchema,
146
- layout: { type: 'string', enum: ['stacked', 'three-panel'] },
147
- showBuiltInScalars: {
148
- type: 'boolean',
149
- },
150
- showBuiltInDirectives: {
151
- type: 'boolean',
152
- },
153
- info: graphqlInfoConfigSchema,
154
- },
155
- additionalProperties: false,
156
- };
157
- //# sourceMappingURL=graphql-config-schema.js.map
@@ -1,44 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.productConfigOverrideSchema = exports.productThemeOverrideSchema = void 0;
4
- const default_theme_config_schema_1 = require("./default-theme-config-schema");
5
- const ex_theme_config_schemas_1 = require("./ex-theme-config-schemas");
6
- const root_config_schema_1 = require("./root-config-schema");
7
- exports.productThemeOverrideSchema = {
8
- type: 'object',
9
- properties: {
10
- logo: default_theme_config_schema_1.themeConfigSchema.properties.logo,
11
- navbar: default_theme_config_schema_1.themeConfigSchema.properties.navbar,
12
- footer: default_theme_config_schema_1.themeConfigSchema.properties.footer,
13
- sidebar: default_theme_config_schema_1.themeConfigSchema.properties.sidebar,
14
- search: default_theme_config_schema_1.themeConfigSchema.properties.search,
15
- codeSnippet: default_theme_config_schema_1.themeConfigSchema.properties.codeSnippet,
16
- breadcrumbs: default_theme_config_schema_1.themeConfigSchema.properties.breadcrumbs,
17
- openapi: default_theme_config_schema_1.themeConfigSchema.properties.openapi,
18
- feedback: default_theme_config_schema_1.themeConfigSchema.properties.feedback,
19
- palette: ex_theme_config_schemas_1.paletteConfigSchema,
20
- mockServer: root_config_schema_1.redoclyConfigSchema.properties.mockServer,
21
- analytics: {
22
- type: 'object',
23
- properties: {
24
- ga: ex_theme_config_schemas_1.productGoogleAnalyticsConfigSchema,
25
- },
26
- },
27
- },
28
- additionalProperties: true,
29
- default: {},
30
- };
31
- exports.productConfigOverrideSchema = {
32
- $id: 'product-config-override',
33
- type: 'object',
34
- properties: Object.assign(Object.assign({}, exports.productThemeOverrideSchema.properties), { apis: {
35
- type: 'object',
36
- additionalProperties: root_config_schema_1.apiConfigSchema,
37
- },
38
- /**
39
- * @deprecated left for backwards compatibility
40
- */
41
- theme: exports.productThemeOverrideSchema }),
42
- additionalProperties: false,
43
- };
44
- //# sourceMappingURL=product-override-schema.js.map
@@ -1,120 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.redocConfigSchema = exports.downloadUrlsSchema = void 0;
4
- const feedback_config_schema_1 = require("./feedback-config-schema");
5
- const codeSamplesConfigSchema = {
6
- type: 'object',
7
- properties: {
8
- languages: {
9
- type: 'array',
10
- items: {
11
- type: 'object',
12
- properties: {
13
- lang: {
14
- type: 'string',
15
- examples: [
16
- 'curl',
17
- 'JavaScript',
18
- 'Node.js',
19
- 'Python',
20
- 'Java8+Apache',
21
- 'Java',
22
- 'C#',
23
- 'C#+Newtonsoft',
24
- 'PHP',
25
- 'Go',
26
- 'Ruby',
27
- 'R',
28
- 'Payload',
29
- ],
30
- },
31
- label: { type: 'string' },
32
- options: {
33
- type: 'object',
34
- properties: {
35
- indent: { type: 'string' },
36
- withImports: { type: 'boolean' },
37
- withComments: { type: 'boolean' },
38
- binary: { type: 'boolean' },
39
- credentials: {
40
- type: 'string',
41
- enum: ['omit', 'same-origin', 'include'],
42
- },
43
- },
44
- additionalProperties: false,
45
- },
46
- },
47
- required: ['lang'],
48
- additionalProperties: false,
49
- },
50
- },
51
- skipOptionalParameters: { type: 'boolean' },
52
- withOAuth2Call: { type: 'boolean' },
53
- },
54
- additionalProperties: false,
55
- };
56
- exports.downloadUrlsSchema = {
57
- type: 'array',
58
- items: {
59
- type: 'object',
60
- properties: {
61
- title: { type: 'string' },
62
- url: { type: 'string' },
63
- },
64
- required: ['url'],
65
- additionalProperties: false,
66
- },
67
- };
68
- exports.redocConfigSchema = {
69
- type: 'object',
70
- properties: {
71
- licenseKey: { type: 'string' },
72
- hideLoading: { type: 'boolean' },
73
- disableRouter: { type: 'boolean' },
74
- hideSidebar: { type: 'boolean' },
75
- feedback: feedback_config_schema_1.feedbackConfigSchema,
76
- hideReplay: { type: 'boolean' },
77
- oAuth2RedirectURI: { type: 'string', nullable: true },
78
- corsProxyUrl: { type: 'string' },
79
- sortRequiredPropsFirst: { type: 'boolean' },
80
- sanitize: { type: 'boolean' },
81
- hideDownloadButtons: { type: 'boolean' },
82
- downloadUrls: exports.downloadUrlsSchema,
83
- onlyRequiredInSamples: { type: 'boolean' },
84
- generatedSamplesMaxDepth: { oneOf: [{ type: 'number' }, { type: 'string' }] },
85
- showExtensions: {
86
- oneOf: [
87
- { type: 'boolean' },
88
- { type: 'string' },
89
- { type: 'array', items: { type: 'string' } },
90
- ],
91
- },
92
- hideSchemaTitles: { type: 'boolean' },
93
- jsonSamplesExpandLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
94
- schemasExpansionLevel: { oneOf: [{ type: 'number' }, { type: 'string' }] },
95
- mockServer: {
96
- type: 'object',
97
- properties: {
98
- url: { type: 'string' },
99
- position: { type: 'string', enum: ['first', 'last', 'replace', 'off'] },
100
- description: { type: 'string' },
101
- },
102
- },
103
- maxDisplayedEnumValues: { type: 'number' },
104
- schemaDefinitionsTagName: { type: 'string' },
105
- layout: { type: 'string', enum: ['stacked', 'three-panel'] },
106
- hideInfoMetadata: { type: 'boolean' },
107
- events: { type: 'object' },
108
- skipBundle: { type: 'boolean' },
109
- routingBasePath: { type: 'string' },
110
- codeSamples: codeSamplesConfigSchema,
111
- ignoreNamedSchemas: {
112
- oneOf: [{ type: 'array', items: { type: 'string' } }, { type: 'string' }],
113
- },
114
- hidePropertiesPrefix: { type: 'boolean' },
115
- excludeFromSearch: { type: 'boolean' },
116
- showSchemaCatalogLinks: { type: 'boolean' },
117
- },
118
- additionalProperties: false,
119
- };
120
- //# sourceMappingURL=redoc-config-schema.js.map