tmpl/schema/tmpl.json

76 lines
1.9 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.jojodev.com/jolheiser/tmpl/raw/branch/main/schema/tmpl.json",
"title": "tmpl template",
"description": "A template for tmpl",
"type": "object",
"required": [
"prompts"
],
"additionalProperties": false,
"properties": {
"prompts": {
"description": "Template prompts",
"type": "array",
"minItems": 1,
"items": {
"type": "object",
"required": [
"id"
],
"additionalProperties": false,
"properties": {
"id": {
"description": "The unique prompt ID",
"type": "string"
},
"label": {
"description": "A label to show instead of the ID when prompting",
"type": "string"
},
"help": {
"description": "A help message for more information on a prompt",
"type": "string"
},
"default": {
"description": "A default value for the prompt",
"type": "string"
},
"options": {
"description": "A set of options for this prompt",
"type": "array",
"minItems": 1,
"items": {
"type": "string"
}
},
"type": {
"description": "The type of prompt",
"type": "string",
"enum": ["input", "multi", "select", "confirm", "editor"]
}
},
"anyOf": [
{
"properties": {
"type": {
"const": "select"
}
},
"required": ["options"]
},
{
"properties": {
"type": {
"not": {
"const": "select"
}
}
}
}
]
}
}
}
}