Files
soft_quay/schemas/manifest.schema.json

176 lines
4.2 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://softbox.invalid/schemas/manifest.schema.json",
"title": "SoftBox Catalog Manifest v1",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"channel",
"generated_at",
"min_box_version",
"apps",
"signature"
],
"properties": {
"schema_version": {
"const": 1
},
"channel": {
"enum": ["modern", "win7"]
},
"generated_at": {
"type": "string",
"format": "date-time"
},
"min_box_version": {
"$ref": "#/$defs/semver"
},
"apps": {
"type": "array",
"items": {
"$ref": "#/$defs/app"
}
},
"signature": {
"$ref": "#/$defs/ed25519Signature"
}
},
"$defs": {
"semver": {
"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-]+)*))?$"
},
"ed25519Signature": {
"type": "string",
"pattern": "^[A-Za-z0-9+/]{86}==$"
},
"sha256": {
"type": "string",
"pattern": "^[0-9A-Fa-f]{64}$"
},
"httpsUrl": {
"type": "string",
"format": "uri",
"pattern": "^https://"
},
"package": {
"type": "object",
"additionalProperties": false,
"required": ["url", "size", "sha256", "signature"],
"properties": {
"url": {
"$ref": "#/$defs/httpsUrl"
},
"size": {
"type": "integer",
"minimum": 1
},
"sha256": {
"$ref": "#/$defs/sha256"
},
"signature": {
"$ref": "#/$defs/ed25519Signature"
}
}
},
"app": {
"type": "object",
"additionalProperties": false,
"required": [
"id",
"name",
"description",
"version",
"channel",
"status",
"category",
"tags",
"min_os",
"architectures",
"entry_exe",
"requires_admin",
"packages"
],
"properties": {
"id": {
"type": "string",
"pattern": "^[a-z0-9-]+$"
},
"name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string",
"minLength": 1
},
"version": {
"$ref": "#/$defs/semver"
},
"channel": {
"const": "stable"
},
"status": {
"enum": ["active", "deprecated", "hidden"]
},
"category": {
"type": "string",
"minLength": 1
},
"tags": {
"type": "array",
"minItems": 1,
"items": {
"type": "string",
"minLength": 1
}
},
"icon": {
"type": "string",
"pattern": "^sha256:[0-9A-Fa-f]{64}$"
},
"homepage": {
"$ref": "#/$defs/httpsUrl"
},
"tutorial": {
"$ref": "#/$defs/httpsUrl"
},
"min_os": {
"enum": ["windows-7-sp1", "windows-10", "windows-11"]
},
"architectures": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"enum": ["386", "amd64"]
}
},
"entry_exe": {
"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": "^(?!/)(?! )(?!.*(/ ))(?!.*\\\\)(?!.*[:<>\"|?*])(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))(?!.*//)(?!.*[ .](/|$)).+$"
},
"requires_admin": {
"type": "boolean"
},
"packages": {
"type": "object",
"minProperties": 1,
"additionalProperties": false,
"properties": {
"386": {
"$ref": "#/$defs/package"
},
"amd64": {
"$ref": "#/$defs/package"
}
}
}
}
}
}
}