Improve JSON schema
This commit is contained in:
@@ -48,12 +48,46 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"required": [
|
||||||
|
"keyActionType"
|
||||||
|
],
|
||||||
"oneOf": [
|
"oneOf": [
|
||||||
{
|
{
|
||||||
"properties": {
|
"properties": {
|
||||||
"keyActionType": {
|
"keyActionType": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"pattern": "^keystroke$"
|
"enum": [
|
||||||
|
"mouse"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mouseAction": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"leftClick",
|
||||||
|
"middleClick",
|
||||||
|
"rightClick",
|
||||||
|
"moveUp",
|
||||||
|
"moveDown",
|
||||||
|
"moveLeft",
|
||||||
|
"moveRight",
|
||||||
|
"scrollUp",
|
||||||
|
"scrollDown",
|
||||||
|
"scrollLeft",
|
||||||
|
"scrollRight",
|
||||||
|
"accelerate",
|
||||||
|
"decelerate"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"keyActionType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"keystroke"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"scancode": {
|
"scancode": {
|
||||||
"type": "integer"
|
"type": "integer"
|
||||||
@@ -61,10 +95,13 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"keyActionType": {
|
"keyActionType": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"pattern": "^switchLayer$"
|
"enum": [
|
||||||
|
"switchLayer"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"layer": {
|
"layer": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
@@ -75,10 +112,39 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"keyActionType": {
|
"keyActionType": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"pattern": "^none$"
|
"enum": [
|
||||||
|
"switchKeymap"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"keymapId": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"keyActionType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"playMacro"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"macroId": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"properties": {
|
||||||
|
"keyActionType": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"none"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user