59 lines
1.9 KiB
JSON
59 lines
1.9 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://config-central.local/schemas/profile.schema.json",
|
|
"title": "Config Central profile",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schemaVersion", "name"],
|
|
"properties": {
|
|
"schemaVersion": { "const": 1 },
|
|
"name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
"description": { "type": "string" },
|
|
"packages": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/package" },
|
|
"default": []
|
|
},
|
|
"configs": {
|
|
"type": "array",
|
|
"items": { "$ref": "#/$defs/config" },
|
|
"default": []
|
|
}
|
|
},
|
|
"$defs": {
|
|
"package": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id"],
|
|
"properties": {
|
|
"id": { "type": "string", "minLength": 1 },
|
|
"source": { "type": "string", "minLength": 1, "default": "winget" },
|
|
"scope": { "enum": ["user", "machine"] },
|
|
"version": { "type": "string", "minLength": 1 },
|
|
"update": { "enum": ["latest", "pinned", "install-only"], "default": "latest" },
|
|
"enabled": { "type": "boolean", "default": true }
|
|
}
|
|
},
|
|
"config": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["name"],
|
|
"properties": {
|
|
"name": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
|
|
"source": { "type": "string", "minLength": 1 },
|
|
"target": { "type": "string", "minLength": 1 },
|
|
"mode": { "const": "copy", "default": "copy" },
|
|
"requiresPackage": { "type": "string", "minLength": 1 },
|
|
"enabled": { "type": "boolean", "default": true }
|
|
},
|
|
"allOf": [
|
|
{
|
|
"if": { "properties": { "enabled": { "const": false } }, "required": ["enabled"] },
|
|
"then": {},
|
|
"else": { "required": ["source", "target"] }
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|