emissary/internal/spec/uci/schema.json

102 lines
2.9 KiB
JSON
Raw Normal View History

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://uci.emissary.cadoles.com/spec.json",
"title": "UCISpec",
"description": "Emissary 'UCI' specification",
"type": "object",
"properties": {
"config": {
"type": "object",
"properties": {
"packages": {
"type": "array",
"items": {
"$ref": "#/$defs/package"
}
}
},
"required": ["packages"],
"additionalProperties": false
},
"postImportCommands": {
"type": "array",
"items": {
"type": "object",
"properties": {
"command": {
"type": "string"
},
"args": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["command", "args"],
"additionalProperties": false
}
}
},
"required": ["config", "postImportCommands"],
"additionalProperties": false,
"$defs": {
"package": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"configs": {
"type": "array",
"items": {
"$ref": "#/$defs/config"
}
}
},
"required": ["name", "configs"],
"additionalProperties": false
},
"config": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"section": {
"type": "string"
},
"options": {
2023-03-08 20:18:40 +01:00
"anyOf": [
{
"type": ["array"],
"items": {
"$ref": "#/$defs/option"
}
},
{ "type": "null" }
]
}
},
2023-03-08 20:18:40 +01:00
"required": ["name", "options"],
"additionalProperties": false
},
"option": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["list", "option"]
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": ["type", "name", "value"],
"additionalProperties": false
}
}
}