@redocly/config 0.41.3 → 0.41.4
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/default-theme-config-schema.d.ts +65 -17
- package/lib/root-config-schema.d.ts +270 -72
- package/lib/scorecards-config-schema.d.ts +130 -34
- package/lib/scorecards-config-schema.js +13 -10
- package/lib-esm/default-theme-config-schema.d.ts +65 -17
- package/lib-esm/root-config-schema.d.ts +270 -72
- package/lib-esm/scorecards-config-schema.d.ts +130 -34
- package/lib-esm/scorecards-config-schema.js +13 -10
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const comparisonOperatorSchema = {
|
|
2
2
|
type: 'string',
|
|
3
3
|
enum: [
|
|
4
4
|
'eq',
|
|
@@ -17,30 +17,33 @@ const operatorSchema = {
|
|
|
17
17
|
'some',
|
|
18
18
|
'every',
|
|
19
19
|
'none',
|
|
20
|
-
'and',
|
|
21
|
-
'or',
|
|
22
|
-
'not',
|
|
23
20
|
],
|
|
24
21
|
};
|
|
25
|
-
|
|
22
|
+
const logicalOperatorSchema = {
|
|
23
|
+
type: 'string',
|
|
24
|
+
enum: ['and', 'or'],
|
|
25
|
+
};
|
|
26
|
+
// Base condition schema with field, operator, value, modifier, and match properties
|
|
26
27
|
const conditionSchema = {
|
|
27
28
|
type: 'object',
|
|
28
29
|
properties: {
|
|
29
30
|
field: { type: 'string' },
|
|
30
|
-
operator:
|
|
31
|
+
operator: comparisonOperatorSchema,
|
|
31
32
|
value: {
|
|
32
33
|
oneOf: [{ type: 'boolean' }, { type: 'string' }, { type: 'number' }],
|
|
33
34
|
},
|
|
35
|
+
modifier: { type: 'string', enum: ['not'] },
|
|
34
36
|
match: {
|
|
35
37
|
type: 'array',
|
|
36
38
|
items: {
|
|
37
39
|
type: 'object',
|
|
38
40
|
properties: {
|
|
39
41
|
field: { type: 'string' },
|
|
40
|
-
operator:
|
|
42
|
+
operator: comparisonOperatorSchema,
|
|
41
43
|
value: {
|
|
42
44
|
oneOf: [{ type: 'boolean' }, { type: 'string' }, { type: 'number' }],
|
|
43
45
|
},
|
|
46
|
+
modifier: { type: 'string', enum: ['not'] },
|
|
44
47
|
},
|
|
45
48
|
},
|
|
46
49
|
},
|
|
@@ -50,7 +53,7 @@ const conditionSchema = {
|
|
|
50
53
|
const logicalOperatorConditionSchema = {
|
|
51
54
|
type: 'object',
|
|
52
55
|
properties: {
|
|
53
|
-
operator:
|
|
56
|
+
operator: logicalOperatorSchema,
|
|
54
57
|
conditions: {
|
|
55
58
|
type: 'array',
|
|
56
59
|
items: conditionSchema, // At the deepest level, only simple conditions
|
|
@@ -68,7 +71,7 @@ const conditionsSchema = {
|
|
|
68
71
|
{
|
|
69
72
|
type: 'object',
|
|
70
73
|
properties: {
|
|
71
|
-
operator:
|
|
74
|
+
operator: logicalOperatorSchema,
|
|
72
75
|
conditions: {
|
|
73
76
|
type: 'array',
|
|
74
77
|
items: {
|
|
@@ -213,7 +216,7 @@ export const scorecardSchema = {
|
|
|
213
216
|
{
|
|
214
217
|
type: 'object',
|
|
215
218
|
properties: {
|
|
216
|
-
operator:
|
|
219
|
+
operator: logicalOperatorSchema,
|
|
217
220
|
conditions: conditionsSchema,
|
|
218
221
|
},
|
|
219
222
|
required: ['operator', 'conditions'],
|