Create download.json.schema

This commit is contained in:
Glavo 2025-10-02 19:46:00 +08:00
parent ed7424fe61
commit c63d342aca
2 changed files with 46 additions and 0 deletions

43
download.json.schema Normal file
View File

@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"dev": {
"type": "object",
"properties": {
"version": {
"type": "string",
"pattern": "^[0-9]+(\\.[0-9]+)+$"
},
"exe": {
"$ref": "#/definitions/file"
},
"jar": {
"$ref": "#/definitions/file"
},
"sh": {
"$ref": "#/definitions/file"
}
}
}
},
"additionalProperties": false,
"required": ["dev"],
"definitions": {
"file": {
"type": "object",
"properties": {
"url": {
"type": "string",
"format": "uri"
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
}
},
"additionalProperties": false,
"required": ["url", "sha256"]
}
}
}

View File

@ -42,6 +42,9 @@
}, },
"force": { "force": {
"type": "boolean" "type": "boolean"
},
"preview": {
"type": "boolean"
} }
}, },
"additionalProperties": false, "additionalProperties": false,