@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.
@@ -1,4 +1,4 @@
1
- const operatorSchema = {
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
- // Base condition schema with field, operator, value, and match properties
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: operatorSchema,
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: operatorSchema,
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: operatorSchema,
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: operatorSchema,
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: operatorSchema,
219
+ operator: logicalOperatorSchema,
217
220
  conditions: conditionsSchema,
218
221
  },
219
222
  required: ['operator', 'conditions'],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/config",
3
- "version": "0.41.3",
3
+ "version": "0.41.4",
4
4
  "license": "MIT",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib-esm/index.js",