{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "https://yourdomain.com/schemas/duck-template.json",
"title": "Duck Template Configuration",
"type": "object",
"required": [
"$schema",
"name",
"version",
"description",
"variants"
],
"properties": {
"$schema": {
"type": "string",
"format": "uri"
},
"name": {
"type": "string"
},
"version": {
"type": "string",
"pattern": "^\\d+\\.\\d+\\.\\d+$"
},
"description": {
"type": "string"
},
"outdir": {
"type": "string"
},
"args": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"ignore": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of paths, directories, or patterns to ignore during processing",
"default": []
},
"variants": {
"type": "array",
"items": {
"$ref": "#/definitions/variant"
}
}
},
"definitions": {
"variant": {
"type": "object",
"required": [
"name",
"description",
"src"
],
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"src": {
"type": "array",
"items": {
"$ref": "#/definitions/source"
}
}
}
},
"source": {
"type": "object",
"discriminator": {
"propertyName": "type"
},
"oneOf": [
{
"$ref": "#/definitions/file"
},
{
"$ref": "#/definitions/folder"
}
]
},
"file": {
"type": "object",
"required": [
"type",
"path",
"content"
],
"properties": {
"type": {
"const": "file"
},
"path": {
"type": "string"
},
"content": {
"type": "string"
},
"args": {
"type": "array",
"default": [],
"items": {
"type": "string"
}
}
}
},
"folder": {
"type": "object",
"required": [
"type",
"path",
"children"
],
"properties": {
"type": {
"const": "folder"
},
"path": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/source"
}
}
}
}
},
"additionalProperties": false
}