{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "yard module configuration Schema",
"anyOf": [
{
"type": "null"
},
{
"type": "object",
"properties": {
"description": {
"type": "string",
"description": "This is a modules description"
},
"args": {
"type": "object",
"properties": {
"required": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 1
},
"optional": {
"type": "array",
"items": {
"type": "string"
}
},
"validate": {
"type": "array",
"description": "Tera assertions evaluated with the module's resolved arguments. Every assertion must pass.",
"items": {
"type": "object",
"properties": {
"assert": {
"type": "string",
"minLength": 1,
"description": "Tera condition expression that must be true. References must name declared arguments."
},
"message": {
"type": "string",
"minLength": 1,
"pattern": "\\S",
"description": "Message reported when the assertion is false."
}
},
"required": ["assert", "message"],
"additionalProperties": false
}
}
},
"anyOf": [
{
"required": [
"optional"
]
},
{
"required": [
"required"
]
},
{
"required": [
"validate"
]
}
]
},
"requires": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"description": "Required module path, relative to the declaring module file."
},
"when": {
"type": "string",
"minLength": 1,
"description": "Optional Tera condition expression evaluated with this module's resolved arguments. Use `arg is defined` to test whether an argument was supplied. Omit for an unconditional requirement."
}
},
"required": ["path"],
"additionalProperties": false
},
"description": "Modules that must be included earlier in any output using this module. Every entry requires path, resolved relative to this module file. An optional when expression makes a requirement conditional."
},
"files": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string",
"minLength": 1,
"description": "File destination, relative to the yard directory. Remote sources are resolved relative to the module file."
},
"when": {
"type": "string",
"minLength": 1,
"description": "Optional Tera condition evaluated with the module's resolved arguments. Omit to always include the file when the module is used."
}
},
"required": ["path"],
"additionalProperties": false
},
"description": "Files to pull in when this module is used. Each entry requires path and optionally when. Paths are relative to the yard directory and cannot contain ~ or .. components."
}
},
"required": [],
"additionalProperties": false
}
]
}