emissary/internal/spec/uci/schema.json

97 lines
2.7 KiB
JSON
Raw Permalink 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": {
"type": "array",
"items": {
"$ref": "#/$defs/option"
}
}
},
"required": ["name", "section", "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
}
}
}