Files
soft_quay/schemas/app.schema.json
T

92 lines
2.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://softbox.invalid/schemas/app.schema.json",
"title": "SoftBox Package app.json v1",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"id",
"name",
"vendor",
"version",
"channel",
"min_os",
"architecture",
"entrypoint",
"working_directory",
"product_id",
"supports_trial",
"requires_admin",
"data_policy",
"update_policy"
],
"properties": {
"schema_version": {
"const": 1
},
"id": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
},
"name": {
"type": "string",
"minLength": 1
},
"vendor": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string",
"pattern": "^(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)\\.(0|[1-9][0-9]*)(?:-((?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*)(?:\\.(?:0|[1-9][0-9]*|[0-9]*[A-Za-z-][0-9A-Za-z-]*))*))?(?:\\+([0-9A-Za-z-]+(?:\\.[0-9A-Za-z-]+)*))?$"
},
"channel": {
"const": "stable"
},
"min_os": {
"enum": ["windows-7-sp1", "windows-10", "windows-11"]
},
"architecture": {
"enum": ["386", "amd64"]
},
"entrypoint": {
"$ref": "#/$defs/safeRelativePath"
},
"working_directory": {
"oneOf": [
{
"const": "."
},
{
"$ref": "#/$defs/safeRelativePath"
}
]
},
"product_id": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
},
"supports_trial": {
"type": "boolean"
},
"requires_admin": {
"type": "boolean"
},
"data_policy": {
"const": "local-app-data"
},
"update_policy": {
"const": "managed-by-softbox"
}
},
"$defs": {
"safeRelativePath": {
"type": "string",
"minLength": 1,
"$comment": "Runtime validation additionally rejects invalid UTF-8/control characters and Windows reserved device names; this pattern is only a basic shape constraint.",
"pattern": "^(?!/)(?! )(?!.*(/ ))(?!.*\\\\)(?!.*[:<>\"|?*])(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))(?!.*//)(?!.*[ .](/|$)).+$"
}
}
}