Integrate validated catalog loading (T-201)
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
{
|
||||
"$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-9A-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,
|
||||
"pattern": "^(?!/)(?!.*\\\\)(?!.*:)(?!\\.\\.?(/|$)).+$"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user