2026-07-16 17:00:06 +08:00
{
"$schema" : "https://json-schema.org/draft/2020-12/schema" ,
"$id" : "https://softbox.invalid/schemas/installed-app.schema.json" ,
"title" : "SoftBox installed-app.json v1" ,
"type" : "object" ,
"additionalProperties" : false ,
"required" : [
"schema_version" ,
"id" ,
"version" ,
"architecture" ,
"channel" ,
"files"
],
"properties" : {
"schema_version" : {
"const" : 1
},
"id" : {
"type" : "string" ,
"pattern" : "^[a-z0-9-]+$"
},
"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-]+)*))?$"
},
"architecture" : {
"enum" : [ "386" , "amd64" ]
},
"channel" : {
"const" : "stable"
},
"files" : {
"type" : "array" ,
"items" : {
"$ref" : "#/$defs/file"
}
}
},
"$defs" : {
"file" : {
"type" : "object" ,
"additionalProperties" : false ,
"required" : [ "path" , "size" , "sha256" ],
"properties" : {
"path" : {
"type" : "string" ,
"minLength" : 1 ,
2026-07-16 23:56:19 +08:00
"$comment" : "Runtime validation additionally rejects invalid UTF-8/control characters and Windows reserved device names; this pattern is only a basic shape constraint." ,
"pattern" : "^(?!/)(?! )(?!.*(/ ))(?!.*\\\\)(?!.*[:<>\"|?*])(?!\\.\\.?(/|$))(?!.*(/\\.\\.?)(/|$))(?!.*//)(?!.*[ .](/|$)).+$"
2026-07-16 17:00:06 +08:00
},
"size" : {
"type" : "integer" ,
"minimum" : 0
},
"sha256" : {
"type" : "string" ,
"pattern" : "^[0-9A-Fa-f]{64}$"
}
}
}
}
}