Skip to content

Commit

Permalink
chore: extract all condition-related properties to condition.json
Browse files Browse the repository at this point in the history
  • Loading branch information
barmac committed Jan 19, 2024
1 parent 132ea18 commit 2eb386d
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@
"allOf",
0,
"items",
"properties",
"condition",
"allOf",
1,
"definitions",
"condition"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
"choices"
]
}
},
{
"$ref": "condition.json"
}
],
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the property."
},
"value": {
"$id": "#/properties/property/value",
"type": [
Expand Down Expand Up @@ -80,7 +79,7 @@
"description": "The value of a choice."
},
"condition": {
"$ref": "condition.json"
"$ref": "condition.json#/properties/condition"
}
},
"required": [
Expand Down Expand Up @@ -143,9 +142,6 @@
"$id": "#/properties/property/group",
"type": "string",
"description": "The custom group of a control field."
},
"condition": {
"$ref": "condition.json"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"$id": "#/condition",
"type": "object",
"description": "Condition(s) to activate the binding.",
"allOf": [
{
"$ref": "examples.json#/condition"
}
],
"definitions": {
"condition": {
"type": "object",
Expand Down Expand Up @@ -71,24 +63,39 @@
]
}
},
"oneOf": [
{
"$ref": "#/definitions/condition"
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the property."
},
{
"properties": {
"allMatch": {
"$id": "#/allMatch",
"type": "array",
"items": {
"$ref": "#/definitions/condition"
"condition": {
"type": "object",
"description": "Condition(s) to activate the binding.",
"allOf": [
{
"$ref": "examples.json#/condition"
}
],
"oneOf": [
{
"$ref": "#/definitions/condition"
},
{
"properties": {
"allMatch": {
"$id": "#/allMatch",
"type": "array",
"items": {
"$ref": "#/definitions/condition"
},
"minItems": 1
}
},
"minItems": 1
"required": [
"allMatch"
]
}
},
"required": [
"allMatch"
]
}
]
}
}
}

0 comments on commit 2eb386d

Please sign in to comment.