emissary/internal/spec/uci/schema.json

124 lines
3.3 KiB
JSON
Raw Permalink Normal View History

{
"$schema": "https://json-schema.org/draft/2019-09/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",
2023-03-08 20:18:40 +01:00
"items": {
"$ref": "#/$defs/option"
}
},
{
"type": "null"
}
2023-03-08 20:18:40 +01:00
]
}
},
"required": [
"name"
],
"additionalProperties": false
},
"option": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"list",
"option"
]
},
"name": {
"type": "string"
},
"value": {
"type": "string"
}
},
"required": [
"type",
"name",
"value"
],
"additionalProperties": false
}
}
}