Skip to content

Commit

Permalink
Update json schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mattrunyon committed Jun 24, 2024
1 parent 8bc2799 commit 95ffe27
Showing 1 changed file with 33 additions and 7 deletions.
40 changes: 33 additions & 7 deletions plugins/ui/src/ui.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,32 @@
"type": "array",
"prefixItems": [{ "type": "object" }],
"items": false
},
"callCallableParams": {
"type": "array",
"prefixItems": [{ "type": "string" }, { "type": "array" }],
"items": false
},
"closeCallableParams": {
"type": "array",
"prefixItems": [{ "type": "string" }],
"items": false
}
},
"type": "object",
"properties": {
"jsonrpc": "2.0",
"method": {
"anyOf": [
{ "enum": ["documentUpdated", "documentError"] },
{ "pattern": "^cb_(0-9)+_(0-9)+$" }
{
"enum": [
"documentUpdated",
"documentError",
"setState",
"callCallable",
"closeCallable"
]
}
]
},
"allOf": [
Expand Down Expand Up @@ -111,15 +128,24 @@
{
"if": {
"properties": {
"method": { "pattern": "^cb_(0-9)+_(0-9)+$" }
"method": { "pattern": "callCallable" }
}
},
"then": {
"properties": {
"params": {
"type": "array",
"items": { "type": "any" }
}
"params": { "$ref": "#/defs/callCallableParams" }
}
}
},
{
"if": {
"properties": {
"method": { "pattern": "closeCallable" }
}
},
"then": {
"properties": {
"params": { "$ref": "#/defs/closeCallableParams" }
}
}
}
Expand Down

0 comments on commit 95ffe27

Please sign in to comment.