cuddle-v2/schemas/base.json
2022-08-12 00:54:22 +02:00

107 lines
2.8 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",
"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"
}