From 37a32018946ab528e13d3775627b8df3286eaa0b Mon Sep 17 00:00:00 2001 From: Glavo Date: Thu, 2 Oct 2025 14:14:47 +0800 Subject: [PATCH] Add update.json.schema --- update.json.schema | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 update.json.schema diff --git a/update.json.schema b/update.json.schema new file mode 100644 index 0000000..1e6fc8c --- /dev/null +++ b/update.json.schema @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "type": "object", + "properties": { + "dev": { + "$ref": "#/definitions/info" + }, + "dev-preview": { + "$ref": "#/definitions/info" + }, + "stable": { + "$ref": "#/definitions/info" + }, + "stable-preview": { + "$ref": "#/definitions/info" + } + }, + "additionalProperties": false, + "required": [ + "dev", + "stable" + ], + "definitions": { + "info": { + "type": "object", + "properties": { + "version": { + "type": "string", + "pattern": "^[0-9]+(\\.[0-9]+)+$" + }, + "jar": { + "type": "string", + "format": "uri" + }, + "jarsha1": { + "type": "string", + "pattern": "^[a-f0-9]{40}$" + }, + "universal": { + "type": "string", + "format": "uri" + }, + "force": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "version", + "jar", + "jarsha1", + "universal" + ] + } + } +} \ No newline at end of file