Files
continuum-schemas/schemas/bambulab/v2/report/print/push_status.schema.json
T
octoturge 7a9b19f72a Put the vt_tray note in $comment, not in properties
The note added a moment ago sat inside `properties` as
`"_comment_no_vt_tray": "..."`, which declares a property whose schema is a
string - and in draft 2020-12 a subschema has to be an object or a boolean.
It parses as JSON and reads fine, and a strict validator would reject the
whole schema. `$comment` is the keyword for this and belongs beside
`properties` rather than inside it.

Swept the rest of schemas/ for the same shape while here: every other
property value is a real subschema.
2026-10-15 21:46:04 +00:00

140 lines
6.5 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report/print/push_status.schema.json",
"title": "PushStatusReport",
"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": [
{ "$ref": "../../../common/envelope.schema.json" },
{
"type": "object",
"$comment": "There is deliberately no vt_tray property here. A real v2 printer omits the key entirely rather than sending an empty object, confirmed live, so absence means 'not reported' and not 'no external spool' - do not add it to make this symmetrical with v1. It is why the external-spool count cannot be derived from a report: counting reported spools would give 0 on exactly the dual-nozzle H2C that has two (see common/ams/ams_mapping.schema.json).",
"properties": {
"command": { "const": "push_status" },
"2D": { "$ref": "./_2d_report.schema.json" },
"3D": { "$ref": "./_3d_report.schema.json" },
"ams": { "$ref": "../../common/ams/ams.schema.json" },
"hms": { "$ref": "../../common/hms.schema.json" },
"lights_report": { "$ref": "../../common/lights_report.schema.json" },
"upgrade_state": { "$ref": "../../common/upgrade_state.schema.json" },
"info": { "$ref": "../../common/info.schema.json" },
"ipcam": { "$ref": "../../common/ipcam.schema.json" },
"online": { "$ref": "../../common/online.schema.json" },
"net": { "$ref": "../../common/net.schema.json" },
"xcam": { "$ref": "../../common/xcam.schema.json" },
"care": { "$ref": "../../common/care.schema.json" },
"upload": { "$ref": "../../common/upload.schema.json" },
"job": { "$ref": "../../common/job/job.schema.json" },
"device": { "$ref": "../../common/device/device.schema.json" },
"vir_slot": {
"type": "array",
"items": {
"$ref": "../../common/vt_tray.schema.json"
}
},
"ams_status": { "type": "integer" },
"ams_rfid_status": { "type": "integer" },
"ap_err": { "type": "integer" },
"aux": { "type": "string" },
"aux_part_fan": { "type": "boolean" },
"batch_id": { "type": "integer" },
"cali_version": { "type": "integer" },
"canvas_id": { "type": "integer" },
"cfg": { "type": "string" },
"design_id": { "type": "string" },
"nozzle_diameter": { "$ref": "../../common/nozzle_diameter.schema.json" },
"nozzle_type": { "$ref": "./_nozzle_type.schema.json" },
"nozzle_temper": { "type": "number" },
"nozzle_target_temper": { "type": "number" },
"bed_temper": { "type": "number" },
"bed_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" },
"err": { "type": "string" },
"fail_reason": { "type": "string" },
"file": { "type": "string" },
"gcode_file": { "type": "string" },
"gcode_state": { "type": "string", "enum": [ "idle", "IDLE", "finish", "FINISH", "running", "RUNNING" ] },
"gcode_file_prepare_percent": { "type": "string" },
"force_upgrade": { "type": "boolean" },
"fun": { "type": "string" },
"fun2": { "type": "string" },
"home_flag": { "type": "integer" },
"hw_switch_state": { "type": "integer" },
"job_attr": { "type": "integer" },
"job_id": { "type": "string" },
"lan_task_id": { "type": "string" },
"layer_num": { "type": "integer" },
"mc_action": { "type": "integer" },
"mc_err": { "type": "integer" },
"mc_percent": { "type": "integer" },
"mc_print_error_code": { "type": "string" },
"mc_print_stage": { "type": "string" },
"mc_print_sub_stage": { "type": "integer" },
"mc_remaining_time": { "type": "integer" },
"mc_stage": { "type": "integer" },
"model_id": { "type": "string" },
"msg": {
"type": "integer",
"description": "Full-vs-partial indicator, as in v1 (0 forced/full, 1 automatic/partial) - but informational here, because v2 sends the entire object on every push. The v1 schema carries the full note on why a v1 consumer must read it."
},
"percent": { "type": "integer" },
"plate_cnt": { "type": "integer" },
"plate_id": { "type": "integer" },
"plate_idx": { "type": "integer" },
"prepare_per": { "type": "integer" },
"print_error": { "type": "integer" },
"print_gcode_action": { "type": "integer" },
"print_real_action": { "type": "integer" },
"print_type": { "type": "string", "enum": [ "", "idle", "IDLE" ] },
"profile_id": { "type": "string" },
"project_id": { "type": "string" },
"queue": { "type": "integer" },
"queue_est": { "type": "integer" },
"queue_number": { "type": "integer" },
"queue_sts": { "type": "integer" },
"queue_total": { "type": "integer" },
"remain_time": { "type": "integer" },
"s_obj": { "type": "array", "items": { "type": "number" } },
"sdcard": { "type": "boolean" },
"sequence_id": { "type": "string" },
"spd_lvl": { "type": "integer", "minimum": 1, "maximum": 4 },
"spd_mag": { "type": "integer", "minimum": 0, "maximum": 100 },
"stat": { "type": "string" },
"state": { "type": "integer" },
"stg": { "type": "array", "items": { "type": "number" } },
"stg_cur": { "type": "integer" },
"subtask_id": { "type": "string" },
"subtask_name": { "type": "string" },
"task_id": { "type": "string" },
"total_layer_num": { "type": "integer", "minimum": 0 },
"ver": { "type": "string" },
"wifi_signal": { "type": "string", "pattern": "^-([0-9]{1,2}|100)dBm$" },
"xcam_status": { "type": "string" },
"mapping": { "type": "array", "items": { "type": "number", "minimum": 0 } }
}
}
]
}