Added v1 schema for PushStatusReport
This commit is contained in:
@@ -60,7 +60,7 @@ Every command/response schema *extends* `envelope.schema.json` with
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "$ref": "../../../envelope.schema.json" },
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
{ "type": "object", "properties": { "command": { "const": "get_version" } } }
|
{ "type": "object", "properties": { "command": { "const": "get_version" } } }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-3
@@ -1,12 +1,27 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/envelope.schema.json",
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/common/envelope.schema.json",
|
||||||
"title": "CommandEnvelope",
|
"title": "CommandEnvelope",
|
||||||
"description": "Fields every Bambu MQTT command/response shares, across both protocol generations - unversioned, at the bambulab/ root, not duplicated under v1/ or v2/. This is the 'base class' - other schemas extend it via allOf + $ref. JSON Schema doesn't have inheritance either, strictly speaking (no 'extends' keyword) - allOf is composition: it says the instance must satisfy THIS schema AND whatever else is listed alongside it. It's the closest thing to real inheritance ergonomics of anything used across this project's schema stack (proto, Rust), because $ref + allOf lets you name and reuse a shape without re-declaring its fields, which proto/Rust composition can't quite do (there you still write `common: PrinterReportCommon` by hand on every struct).",
|
"description": "Fields every Bambu MQTT command/response shares, across both protocol generations - unversioned, at the bambulab/ root, not duplicated under v1/ or v2/. This is the 'base class' - other schemas extend it via allOf + $ref. JSON Schema doesn't have inheritance either, strictly speaking (no 'extends' keyword) - allOf is composition: it says the instance must satisfy THIS schema AND whatever else is listed alongside it. It's the closest thing to real inheritance ergonomics of anything used across this project's schema stack (proto, Rust), because $ref + allOf lets you name and reuse a shape without re-declaring its fields, which proto/Rust composition can't quite do (there you still write `common: PrinterReportCommon` by hand on every struct).",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"sequence_id": { "type": "string" },
|
"sequence_id": {
|
||||||
"command": { "type": "string" }
|
"type": "string",
|
||||||
|
"description": "Sequence ID matching the original request"
|
||||||
|
},
|
||||||
|
"command": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Command being reported on"
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["success", "fail", "SUCCESS", "FAIL"],
|
||||||
|
"description": "Result status (case-insensitive)"
|
||||||
|
},
|
||||||
|
"reason": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Optional reason or error message"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"required": ["sequence_id", "command"]
|
"required": ["sequence_id", "command"]
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/nozzle_diameter.schema.json",
|
||||||
|
"title": "NozzleDiameter",
|
||||||
|
"description": "Common schema for nozzle diameter",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"0.2",
|
||||||
|
"0.4",
|
||||||
|
"0.6",
|
||||||
|
"0.8"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/common/nozzle_type.schema.json",
|
||||||
|
"title": "NozzleType",
|
||||||
|
"description": "Common schema for nozzle type",
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"stainless_steel",
|
||||||
|
"hardened_steel"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,15 +1,13 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/info/get_version.schema.json",
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/info/get_version.schema.json",
|
||||||
"title": "GetVersionResponse",
|
"title": "GetVersionReport",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "$ref": "../../../envelope.schema.json" },
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"command": { "const": "get_version" },
|
"command": { "const": "get_version" },
|
||||||
"result": { "type": "string" },
|
|
||||||
"reason": { "type": "string" },
|
|
||||||
"module": {
|
"module": {
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"items": { "$ref": "_module_info.schema.json" }
|
"items": { "$ref": "_module_info.schema.json" }
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_online.schema.json",
|
||||||
|
"title": "Online",
|
||||||
|
"description": "Printer online/offline status",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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/print/_ipcam.schema.json",
|
||||||
|
"title": "Ipcam",
|
||||||
|
"description": "Report about the in-built IP camera",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ipcam_dev": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"ipcam_record": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"enable",
|
||||||
|
"disable",
|
||||||
|
"ENABLE",
|
||||||
|
"DISABLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"timelapse": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"enable",
|
||||||
|
"disable",
|
||||||
|
"ENABLE",
|
||||||
|
"DISABLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"resolution": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"tutk_server": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"enable",
|
||||||
|
"disable",
|
||||||
|
"ENABLE",
|
||||||
|
"DISABLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"mode_bits": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_lights_report.schema.json",
|
||||||
|
"title": "LightsReport",
|
||||||
|
"description": "Report status of printer lights",
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"mode": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"on",
|
||||||
|
"off",
|
||||||
|
"ON",
|
||||||
|
"OFF"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"node": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"chamber_light",
|
||||||
|
"work_light",
|
||||||
|
"chamber_light2"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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/print/_net.schema.json",
|
||||||
|
"title": "Net",
|
||||||
|
"description": "Network status",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"conf": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"info": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ip": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"mask": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": [
|
||||||
|
"ip",
|
||||||
|
"mask"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_online.schema.json",
|
||||||
|
"title": "Online",
|
||||||
|
"description": "Printer online/offline status",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"ahb": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"rfid": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"version": {
|
||||||
|
"type": "integer"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||||
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/report/print/_upload.schema.json",
|
||||||
|
"title": "Upload",
|
||||||
|
"description": "File upload progress",
|
||||||
|
"oneOf": [
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"idle",
|
||||||
|
"IDLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"progress": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"file_size": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"finish_size": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"message": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"oss_url": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"progress": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"speed": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"status": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": [
|
||||||
|
"idle",
|
||||||
|
"IDLE"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"task_id": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"time_remaining": {
|
||||||
|
"type": "integer"
|
||||||
|
},
|
||||||
|
"trouble_id": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -4,19 +4,78 @@
|
|||||||
"title": "PrintReport",
|
"title": "PrintReport",
|
||||||
"description": "The ongoing print-state push (root key \"print\") - NOT a direct reply to the pushall request (that goes to \"pushing\", see request/pushing/pushall.schema.json). Sending pushall makes the printer start/refresh this stream; it isn't itself request/response, which is also why this is its own category folder rather than sitting under pushing/ - a category here is 'what root key does this arrive under', not 'what triggered it'.",
|
"description": "The ongoing print-state push (root key \"print\") - NOT a direct reply to the pushall request (that goes to \"pushing\", see request/pushing/pushall.schema.json). Sending pushall makes the printer start/refresh this stream; it isn't itself request/response, which is also why this is its own category folder rather than sitting under pushing/ - a category here is 'what root key does this arrive under', not 'what triggered it'.",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "$ref": "../../../envelope.schema.json" },
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
"ams": { "$ref": "_ams.schema.json" },
|
"command": { "const": "push_status" },
|
||||||
"ams_exist_bits": { "type": "string" },
|
|
||||||
"insert_flag": { "type": "boolean" },
|
|
||||||
"power_on_flag": { "type": "boolean" },
|
|
||||||
"tray_exist_bits": { "type": "string" },
|
|
||||||
"tray_is_bbl_bits": { "type": "string" },
|
|
||||||
"upgrade_state": { "$ref": "_upgrade_state.schema.json" },
|
"upgrade_state": { "$ref": "_upgrade_state.schema.json" },
|
||||||
|
"ipcam": { "$ref": "_ipcam.schema.json" },
|
||||||
|
"upload": { "$ref": "_upload.schema.json" },
|
||||||
|
"net": { "$ref": "_net.schema.json" },
|
||||||
|
"hms": { "$ref": "_hms.schema.json" },
|
||||||
|
"online": { "$ref": "_online.schema.json" },
|
||||||
|
"ams": { "$ref": "_ams.schema.json" },
|
||||||
|
"vt_tray": { "$ref": "_vt_tray.schema.json" },
|
||||||
|
"lights_report": { "$ref": "_lights_report.schema.json" },
|
||||||
"xcam": { "$ref": "_xcam.schema.json" },
|
"xcam": { "$ref": "_xcam.schema.json" },
|
||||||
"xcam_status": { "type": "string" }
|
|
||||||
|
"nozzle_diameter": { "$ref": "../../common/nozzle_diameter.schema.json" },
|
||||||
|
"nozzle_type": { "$ref": "../../common/nozzle_type.schema.json" },
|
||||||
|
"nozzle_temper": { "type": "number" },
|
||||||
|
"nozzle_target_temper": { "type": "number" },
|
||||||
|
"bed_temper": { "type": "number" },
|
||||||
|
"bed_target_temper": { "type": "number" },
|
||||||
|
"chamber_temper": { "type": "number" },
|
||||||
|
"chamber_target_temper": { "type": "number" },
|
||||||
|
"fan_gear": { "type": "integer" },
|
||||||
|
"heatbreak_fan_speed": { "type": "string" },
|
||||||
|
"cooling_fan_speed": { "type": "string" },
|
||||||
|
"big_fan1_speed": { "type": "string" },
|
||||||
|
"big_fan2_speed": { "type": "string" },
|
||||||
|
|
||||||
|
"s_obj": { "type": "array", "items": {} },
|
||||||
|
"filam_bak": { "type": "array", "items": {} },
|
||||||
|
"stg": { "type": "array", "items": {} },
|
||||||
|
|
||||||
|
"mc_print_stage": { "type": "string" },
|
||||||
|
"mc_percent": { "type": "integer" },
|
||||||
|
"mc_remaining_time": { "type": "integer" },
|
||||||
|
|
||||||
|
"ams_status": { "type": "integer" },
|
||||||
|
"ams_rfid_status": { "type": "integer" },
|
||||||
|
"hw_switch_state": { "type": "integer" },
|
||||||
|
"spd_mag": { "type": "integer", "minimum": 0, "maximum": 100 },
|
||||||
|
"spd_lvl": { "type": "integer", "minimum": 1, "maximum": 4 },
|
||||||
|
"print_error": { "type": "integer" },
|
||||||
|
"lifecycle": { "type": "string", "enum": ["product"] },
|
||||||
|
"wifi_signal": { "type": "string", "pattern": "^-([0-9]{1,2}|100)dBm$" },
|
||||||
|
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE" ] },
|
||||||
|
"gcode_file_prepare_percent": { "type": "string" },
|
||||||
|
"queue_number": { "type": "integer" },
|
||||||
|
"queue_total": { "type": "integer" },
|
||||||
|
"queue_est": { "type": "integer" },
|
||||||
|
"queue_sts": { "type": "integer" },
|
||||||
|
"project_id": { "type": "string" },
|
||||||
|
"profile_id": { "type": "string" },
|
||||||
|
"task_id": { "type": "string" },
|
||||||
|
"subtask_id": { "type": "string" },
|
||||||
|
"subtask_name": { "type": "string" },
|
||||||
|
"gcode_file": { "type": "string" },
|
||||||
|
"stg_cur": { "type": "integer" },
|
||||||
|
"print_type": { "type": "string", "enum": [ "idle", "IDLE" ] },
|
||||||
|
"home_flag": { "type": "integer" },
|
||||||
|
"mc_print_line_number": { "type": "string" },
|
||||||
|
"mc_print_sub_stage": { "type": "integer" },
|
||||||
|
"sdcard": { "type": "boolean" },
|
||||||
|
"force_upgrade": { "type": "boolean" },
|
||||||
|
"mess_production_state": { "type": "string", "enum": [ "active", "inactive", "ACTIVE", "INACTIVE" ] },
|
||||||
|
"layer_num": { "type": "integer" },
|
||||||
|
"total_layer_num": { "type": "integer" },
|
||||||
|
"cali_version": { "type": "integer" },
|
||||||
|
"k": { "type": "string" },
|
||||||
|
"flag3": { "type": "integer" }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/info/get_version.schema.json",
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/info/get_version.schema.json",
|
||||||
"title": "GetVersionRequest",
|
"title": "GetVersionRequest",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "$ref": "../../../envelope.schema.json" },
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/pushing/pushall.schema.json",
|
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v1/request/pushing/pushall.schema.json",
|
||||||
"title": "PushallRequest",
|
"title": "PushallRequest",
|
||||||
"allOf": [
|
"allOf": [
|
||||||
{ "$ref": "../../../envelope.schema.json" },
|
{ "$ref": "../../../common/envelope.schema.json" },
|
||||||
{
|
{
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
Reference in New Issue
Block a user