Skip to content

Commit

Permalink
validate prerequisiteTag more precisely, closes #82
Browse files Browse the repository at this point in the history
  • Loading branch information
tyrasd committed Jan 20, 2023
1 parent 6276138 commit a33e1d9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion schemas/field.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@
},
"prerequisiteTag": {
"description": "Tagging constraint for showing this field in the editor",
"anyOf": [
"oneOf": [
{
"$id": "requires-key-is-value",
"type": "object",
"properties": {
"key": {
Expand All @@ -181,6 +182,18 @@
"value": {
"description": "The value that the tag must have. (alternative to 'valueNot')",
"type": "string"
}
},
"additionalProperties": false
},
{
"$id": "requires-key-is-not-value",
"type": "object",
"properties": {
"key": {
"description": "The key of the required tag",
"type": "string",
"required": true
},
"valueNot": {
"description": "The value that the tag cannot have. (alternative to 'value')",
Expand All @@ -190,6 +203,7 @@
"additionalProperties": false
},
{
"$id": "requires-not-key",
"type": "object",
"properties": {
"keyNot": {
Expand Down

0 comments on commit a33e1d9

Please sign in to comment.