Skip to content

Commit

Permalink
schema
Browse files Browse the repository at this point in the history
  • Loading branch information
PankajBhojwani committed May 3, 2024
1 parent ccf1cc9 commit 7793c5c
Showing 1 changed file with 42 additions and 19 deletions.
61 changes: 42 additions & 19 deletions doc/cascadia/profiles.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -2044,7 +2044,7 @@
]
}
},
"Keybinding": {
"FullCommand": {
"additionalProperties": false,
"properties": {
"command": {
Expand Down Expand Up @@ -2169,21 +2169,6 @@
}
]
},
"keys": {
"description": "Defines the key combinations used to call the command. It must be composed of...\n -any number of modifiers (ctrl/alt/shift)\n -a non-modifier key",
"oneOf": [
{
"$ref": "#/$defs/KeyChordSegment"
},
{
"items": {
"$ref": "#/$defs/KeyChordSegment"
},
"minItems": 1,
"type": "array"
}
]
},
"icon": {
"$ref": "#/$defs/Icon"
},
Expand Down Expand Up @@ -2215,7 +2200,7 @@
"commands": {
"description": "List of commands to execute",
"items": {
"$ref": "#/$defs/Keybinding/properties/command"
"$ref": "#/$defs/FullCommand/properties/command"
},
"minItems": 1,
"type": "array"
Expand All @@ -2236,6 +2221,44 @@
],
"type": "object"
},
"Keybinding": {
"additionalProperties": false,
"properties": {
"id": {
"description": "The ID of the command this keybinding should execute.",
"type": "string"
},
"keys": {
"description": "Defines the key combinations used to call the command. It must be composed of...\n -any number of modifiers (ctrl/alt/shift)\n -a non-modifier key",
"oneOf": [
{
"$ref": "#/$defs/KeyChordSegment"
},
{
"items": {
"$ref": "#/$defs/KeyChordSegment"
},
"minItems": 1,
"type": "array"
}
]
}
},
"anyOf": [
{
"required": [
"keys",
"id"
]
},
{
"required": [
"keys"
]
}
],
"type": "object"
},
"Globals": {
"additionalProperties": true,
"description": "Properties that affect the entire window, regardless of the profile settings.",
Expand Down Expand Up @@ -2439,12 +2462,12 @@
"actions": {
"description": "Properties are specific to each custom action.",
"items": {
"$ref": "#/$defs/Keybinding"
"$ref": "#/$defs/FullCommand"
},
"type": "array"
},
"keybindings": {
"description": "[deprecated] Use actions instead.",
"description": "A list of keychords bound to action IDs",
"deprecated": true,
"items": {
"$ref": "#/$defs/Keybinding"
Expand Down

0 comments on commit 7793c5c

Please sign in to comment.