forked from derailed/k9s
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add plugin.yml JSON schema (derailed#2235)
- Loading branch information
Julien Bouquillon
authored
Oct 8, 2023
1 parent
6dc4342
commit a4e0f0b
Showing
1 changed file
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Schema for k9s CLI plugin.yml file : https://k9scli.io/topics/plugins", | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"plugin": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"shortCut": { | ||
"description": "Define a mnemonic to invoke the plugin", | ||
"type": "string" | ||
}, | ||
"description": { | ||
"description": "What will be shown on the K9s menu", | ||
"type": "string" | ||
}, | ||
"confirm": { | ||
"description": "See the command that is going to be executed and gives you an option to confirm", | ||
"type": "boolean" | ||
}, | ||
"scopes": { | ||
"type": "array", | ||
"description": "Collections of views that support this shortcut. (You can use `all`)", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"command": { | ||
"description": "The command to run upon invocation. Can use Krew plugins here too!", | ||
"type": "string" | ||
}, | ||
"background": { | ||
"description": "Whether or not to run the command in background mode", | ||
"type": "boolean" | ||
}, | ||
"args": { | ||
"description": "Defines the command arguments", | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"required": ["shortCut", "description", "scopes", "command"] | ||
}, | ||
"required": [] | ||
} | ||
}, | ||
"required": ["plugin"] | ||
} |