cuddle/schemas/base.json
kjuulh 6aa90d22ea
All checks were successful
continuous-integration/drone/push Build is passing
feat: fix additional properties
Signed-off-by: kjuulh <contact@kjuulh.io>
2024-11-16 16:58:24 +01:00

139 lines
3.8 KiB
JSON

{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": true,
"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"
},
{
"type": "array"
}
]
}
},
"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"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean"
},
"default": {
"type": "string"
}
}
},
{
"type": "object",
"required": [
"type",
"key"
],
"additionalProperties": false,
"properties": {
"type": {
"enum": [
"env"
]
},
"description": {
"type": "string"
},
"key": {
"title": "the environment key to pull arg from",
"type": "string"
}
}
}
]
}
}
}
}
}
}
}
},
"required": [
"base"
],
"type": "object",
"title": "Cuddle base schema"
}