feat: added upgrade schemas vor BambuMQTT v1 and v2
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/common/url.schema.json",
|
||||||
|
"title": "CommonUrlSchema",
|
||||||
|
"type": "string",
|
||||||
|
"format": "uri",
|
||||||
|
"pattern": "^https?://"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/common/version.schema.json",
|
||||||
|
"title": "CommonVersionSchema",
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^(?:\\d{2}\\.){3}\\d{2}$"
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/firmware_details.schema.json",
|
||||||
|
"title": "FirmwareDetails",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"description": { "type": "string" },
|
||||||
|
"force_update": { "type": "boolean" },
|
||||||
|
"url": { "$ref": "../../common/url.schema.json" },
|
||||||
|
"version": { "$ref": "../../common/version.schema.json" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "ConsistencyConfirmReport",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "consistency_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/upgrade/get_history.schema.json",
|
||||||
|
"title": "GetUpgradeHistoryReport",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "get_history" },
|
||||||
|
"firmware_optional": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ams": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"address": { "type": "integer" },
|
||||||
|
"dev_model_name": { "type": "string" },
|
||||||
|
"device_id": { "type": "string" },
|
||||||
|
"firmware": {
|
||||||
|
"type": ["null", "array"],
|
||||||
|
"items": { "$ref": "../../common/firmware_details.schema.json" }
|
||||||
|
},
|
||||||
|
"firmware_current": {
|
||||||
|
"type": ["null", "array"],
|
||||||
|
"items": { "$ref": "../../common/firmware_details.schema.json" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"firmware": {
|
||||||
|
"type": ["null", "array"],
|
||||||
|
"items": { "$ref": "../../common/firmware_details.schema.json" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["firmware_optional"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/upgrade/start.schema.json",
|
||||||
|
"title": "UpgradeStartReport",
|
||||||
|
"description": "TODO: Quite possibly incorrect - validate",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "start" },
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "URL of a signed JSON with URLs to signed binaries",
|
||||||
|
"format": "uri",
|
||||||
|
"pattern": "^https?://"
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["ota", "ams"]
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "New version number that will get downloaded"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["url", "module", "version"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "UpgradeConfirmReport",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "upgrade_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -8,8 +8,7 @@
|
|||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"command": { "const": "unload_filament" }
|
"command": { "const": "unload_filament" }
|
||||||
},
|
}
|
||||||
"required": ["param"]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "ConsistencyConfirmRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "consistency_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/upgrade/get_history.schema.json",
|
||||||
|
"title": "GetUpgradeHistoryRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "get_history" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/upgrade/start.schema.json",
|
||||||
|
"title": "UpgradeStartRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "start" },
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "URL of a signed JSON with URLs to signed binaries",
|
||||||
|
"format": "uri",
|
||||||
|
"pattern": "^https?://"
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["ota", "ams"]
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "New version number that will get downloaded",
|
||||||
|
"pattern": "^(?:\\d{2}\\.){3}\\d{2}$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["url", "module", "version"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "UpgradeConfirmRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "upgrade_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/firmware_details.schema.json",
|
||||||
|
"title": "FirmwareDetails",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"description": { "type": "string" },
|
||||||
|
"force_update": { "type": "boolean" },
|
||||||
|
"url": { "$ref": "../../common/url.schema.json" },
|
||||||
|
"version": { "$ref": "../../common/version.schema.json" }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"force_upgrade": { "type": "boolean" },
|
"force_upgrade": { "type": "boolean" },
|
||||||
"idx": { "type": "integer" },
|
"idx": { "type": "integer" },
|
||||||
"idx2": { "type": "integer" },
|
"idx2": { "type": "integer" },
|
||||||
"lower_limit": { "type": "string", "pattern": "..\\...\\...\\..." },
|
"lower_limit": { "type": "string", "pattern": "^(?:\\d{2}\\.){3}\\d{2}$" },
|
||||||
"message": { "type": "string" },
|
"message": { "type": "string" },
|
||||||
"module": { "type": "string" },
|
"module": { "type": "string" },
|
||||||
"new_version_state": { "type": "integer" },
|
"new_version_state": { "type": "integer" },
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "ConsistencyConfirmReport",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "consistency_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/upgrade/get_history.schema.json",
|
||||||
|
"title": "GetUpgradeHistoryReport",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "get_history" },
|
||||||
|
"firmware_optional": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ams": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"address": { "type": "integer" },
|
||||||
|
"dev_model_name": { "type": "string" },
|
||||||
|
"device_id": { "type": "string" },
|
||||||
|
"firmware": {
|
||||||
|
"type": ["null", "array"],
|
||||||
|
"items": { "$ref": "../../common/firmware_details.schema.json" }
|
||||||
|
},
|
||||||
|
"firmware_current": {
|
||||||
|
"type": ["null", "array"],
|
||||||
|
"items": { "$ref": "../../common/firmware_details.schema.json" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"firmware": {
|
||||||
|
"type": ["null", "array"],
|
||||||
|
"items": { "$ref": "../../common/firmware_details.schema.json" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["firmware_optional"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/upgrade/start.schema.json",
|
||||||
|
"title": "UpgradeStartReport",
|
||||||
|
"description": "TODO: Quite possibly incorrect - validate",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "start" },
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "URL of a signed JSON with URLs to signed binaries",
|
||||||
|
"format": "uri",
|
||||||
|
"pattern": "^https?://"
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["ota", "ams"]
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "New version number that will get downloaded"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["url", "module", "version"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "UpgradeConfirmReport",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "upgrade_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "ConsistencyConfirmRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "consistency_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/upgrade/get_history.schema.json",
|
||||||
|
"title": "GetUpgradeHistoryRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "get_history" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/upgrade/start.schema.json",
|
||||||
|
"title": "UpgradeStartRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "start" },
|
||||||
|
"url": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "URL of a signed JSON with URLs to signed binaries",
|
||||||
|
"format": "uri",
|
||||||
|
"pattern": "^https?://"
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["ota", "ams"]
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "New version number that will get downloaded",
|
||||||
|
"pattern": "^(?:\\d{2}\\.){3}\\d{2}$"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["url", "module", "version"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request/upgrade/upgrade_confirm.schema.json",
|
||||||
|
"title": "UpgradeConfirmRequest",
|
||||||
|
"allOf": [
|
||||||
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"command": { "const": "upgrade_confirm" }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user