Skip to content

Commit

Permalink
Update JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Quicksilver0218 committed Feb 19, 2025
1 parent 4bec034 commit 30e7323
Showing 1 changed file with 28 additions and 23 deletions.
51 changes: 28 additions & 23 deletions validation-rules-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@
"field": {
"description": "The field to be checked",
"type": "string"
},
"arg": {
"description": "The argument of the condition",
"type": "string"
},
"args": {
"description": "The arguments of the condition",
"type": "array",
"items": {
"type": "string",
"minItems": 1,
"uniqueItems": true
}
},
"conditions": {
"description": "The sub-conditions of the condition",
"type": "array",
"items": {
"$ref": "#/items/properties/condition"
}
}
},
"required": ["type"],
Expand All @@ -49,21 +29,46 @@
"type": { "enum": [
"regex", "bytes", "length", "contains", "range",
"!regex", "!bytes", "!length", "!contains", "!range"
] }
] },
"arg": {
"description": "The argument of the condition",
"type": "string"
}
},
"required": ["arg"]
},
{
"properties": {
"type": { "enum": ["in", "!in"] }
"type": { "enum": ["in", "!in"] },
"args": {
"description": "The arguments of the condition",
"type": "array",
"items": {
"type": "string",
"minItems": 1,
"uniqueItems": true
}
}
},
"required": ["args"]
},
{
"properties": {
"type": { "enum": ["and", "or", "!and", "!or"] }
"type": { "enum": ["and", "or", "!and", "!or"] },
"conditions": {
"description": "The sub-conditions of the condition",
"type": "array",
"items": {
"$ref": "#/items/properties/condition"
}
}
},
"required": ["conditions"]
},
{
"properties": {
"type": { "enum": ["null", "blank", "true", "!null", "!blank", "!true"] }
}
}
],
"defaultSnippets": [
Expand Down

0 comments on commit 30e7323

Please sign in to comment.