cuddle-v2/schemas/base.json
kjuulh 12bd424f18
feat: with schema
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-02 00:47:14 +02:00

130 lines
3.5 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"base": {
"title": "Base url from which to base current cuddle plan on",
"description": "Base url from which to construct current cuddle plan, is recursive",
"oneOf": [
{
"type": "string",
"title": "The url of the parameter"
},
{
"type": "boolean",
"title": "Whether it is enabled or not"
}
]
},
"vars": {
"type": "object",
"title": "your collection of variables to be available to cuddle",
"patternProperties": {
"^.*$": {
"anyOf": [
{
"type": "string"
},
{
"type": "object"
}
]
}
},
"additionalProperties": false
},
"scripts": {
"type": "object",
"title": "Scripts the cuddle cli can execute",
"description": "Scripts the cuddle cli can execute 'cuddle x my-awesome-script'",
"additionalProperties": false,
"patternProperties": {
"^.*$": {
"required": [
"type"
],
"additionalProperties": false,
"properties": {
"type": {
"enum": [
"shell",
"dagger"
]
},
"description": {
"type": "string"
},
"vars": {
"type": "object",
"title": "your collection of variables to be available to cuddle",
"patternProperties": {
"^.*$": {
"type": "string"
}
},
"additionalProperties": false
},
"args": {
"title": "arguments to send to the specified script",
"type": "object",
"patternProperties": {
"^.*$": {
"anyOf": [
{
"type": "object",
"required": [
"type",
"name"
],
"properties": {
"type": {
"enum": [
"flag"
]
},
"name": {
"type": "string"
},
"required": {
"type": "boolean"
},
"default": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"type",
"key"
],
"additionalProperties": false,
"properties": {
"type": {
"enum": [
"env"
]
},
"key": {
"title": "the environment key to pull arg from",
"type": "string"
}
}
}
]
}
}
}
}
}
}
}
},
"required": [
"base"
],
"type": "object",
"title": "Cuddle base schema"
}