Skip to content

Commit 30e7323

Browse files
Update JSON schema
1 parent 4bec034 commit 30e7323

File tree

1 file changed

+28
-23
lines changed

1 file changed

+28
-23
lines changed

validation-rules-schema.json

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,6 @@
2020
"field": {
2121
"description": "The field to be checked",
2222
"type": "string"
23-
},
24-
"arg": {
25-
"description": "The argument of the condition",
26-
"type": "string"
27-
},
28-
"args": {
29-
"description": "The arguments of the condition",
30-
"type": "array",
31-
"items": {
32-
"type": "string",
33-
"minItems": 1,
34-
"uniqueItems": true
35-
}
36-
},
37-
"conditions": {
38-
"description": "The sub-conditions of the condition",
39-
"type": "array",
40-
"items": {
41-
"$ref": "#/items/properties/condition"
42-
}
4323
}
4424
},
4525
"required": ["type"],
@@ -49,21 +29,46 @@
4929
"type": { "enum": [
5030
"regex", "bytes", "length", "contains", "range",
5131
"!regex", "!bytes", "!length", "!contains", "!range"
52-
] }
32+
] },
33+
"arg": {
34+
"description": "The argument of the condition",
35+
"type": "string"
36+
}
5337
},
5438
"required": ["arg"]
5539
},
5640
{
5741
"properties": {
58-
"type": { "enum": ["in", "!in"] }
42+
"type": { "enum": ["in", "!in"] },
43+
"args": {
44+
"description": "The arguments of the condition",
45+
"type": "array",
46+
"items": {
47+
"type": "string",
48+
"minItems": 1,
49+
"uniqueItems": true
50+
}
51+
}
5952
},
6053
"required": ["args"]
6154
},
6255
{
6356
"properties": {
64-
"type": { "enum": ["and", "or", "!and", "!or"] }
57+
"type": { "enum": ["and", "or", "!and", "!or"] },
58+
"conditions": {
59+
"description": "The sub-conditions of the condition",
60+
"type": "array",
61+
"items": {
62+
"$ref": "#/items/properties/condition"
63+
}
64+
}
6565
},
6666
"required": ["conditions"]
67+
},
68+
{
69+
"properties": {
70+
"type": { "enum": ["null", "blank", "true", "!null", "!blank", "!true"] }
71+
}
6772
}
6873
],
6974
"defaultSnippets": [

0 commit comments

Comments
 (0)