Improve JSON schema

This commit is contained in:
József Farkas
2016-07-16 17:45:39 +02:00
parent baaec669e0
commit 7a331d31c4

View File

@@ -48,12 +48,46 @@
]
}
},
"required": [
"keyActionType"
],
"oneOf": [
{
"properties": {
"keyActionType": {
"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": {
"type": "integer"
@@ -61,10 +95,13 @@
}
},
{
"type": "object",
"properties": {
"keyActionType": {
"type": "string",
"pattern": "^switchLayer$"
"enum": [
"switchLayer"
]
},
"layer": {
"type": "string"
@@ -75,10 +112,39 @@
}
},
{
"type": "object",
"properties": {
"keyActionType": {
"type": "string",
"pattern": "^none$"
"enum": [
"switchKeymap"
]
},
"keymapId": {
"type": "integer"
}
}
},
{
"properties": {
"keyActionType": {
"type": "string",
"enum": [
"playMacro"
]
},
"macroId": {
"type": "integer"
}
}
},
{
"properties": {
"keyActionType": {
"type": "string",
"enum": [
"none"
]
}
}
}