Fix broken v2 bambulab schema refs, wire up v2 dispatchers, fix PrintJobStatus JSON mismatch
- v2/common/device/device.schema.json: stray backtick in bed $ref broke resolution - v2/report/print/print.schema.json: ams $ref pointed at wrong path (missing ams/ subdir) - v2/common/device/plate.schema.json: $id was copy-pasted from bed.schema.json - Add v2/request.schema.json and v2/report.schema.json dispatchers - v2's leaf schemas were unreachable without them, same oneOf convention as v1 - Rewrite schemas/bambulab/README.md layout section, which still described v1's pre-rename paths and claimed v2 was removed - PrintJob.status serialized as a raw i32 in Rust (prost stores proto3 enums as i32) while ts-types' TypeBox schema validates full enum name strings - add serde with= on the field so Rust JSON matches TS and protobuf's own canonical JSON enum mapping, plus a regression test
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"airduct": { "$ref": "./airduct.schema.json" },
|
||||
"bed": { "$ref": "./bed.schema.json`" },
|
||||
"bed": { "$ref": "./bed.schema.json" },
|
||||
"cam": { "$ref": "./cam.schema.json" },
|
||||
"ctc": { "$ref": "./ctc.schema.json" },
|
||||
"ext_tool": { "$ref": "./ext_tool.schema.json" },
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/bed.schema.json",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/common/device/plate.schema.json",
|
||||
"title": "DevicePlate",
|
||||
"description": "Detailed info about Plate",
|
||||
"type": "object",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/report.schema.json",
|
||||
"title": "BambuReportV2",
|
||||
"description": "V2 equivalent of v1/report.schema.json - same 'what root key does this arrive under' convention (see v1/report.schema.json for the print-vs-pushing rationale). Only wires categories that actually have a v2 schema on disk; add a property here when a new v2/report/<category>/ schema is added.",
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"maxProperties": 1,
|
||||
"properties": {
|
||||
"info": {
|
||||
"oneOf": [
|
||||
{ "$ref": "report/info/get_version.schema.json" }
|
||||
]
|
||||
},
|
||||
"print": {
|
||||
"oneOf": [
|
||||
{ "$ref": "report/print/print.schema.json" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
"2D": { "$ref": "./_2d_report.schema.json" },
|
||||
"3D": { "$ref": "./_3d_report.schema.json" },
|
||||
"ams": { "$ref": "../../common/ams.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" },
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/bambulab/v2/request.schema.json",
|
||||
"title": "BambuRequestV2",
|
||||
"description": "V2 equivalent of v1/request.schema.json - one JSON key naming the category, each a oneOf to leave room for more than one request shape per category. Only wires categories that actually have a v2 schema on disk; add a property here when a new v2/request/<category>/ schema is added.",
|
||||
"type": "object",
|
||||
"minProperties": 1,
|
||||
"maxProperties": 1,
|
||||
"properties": {
|
||||
"info": {
|
||||
"oneOf": [
|
||||
{ "$ref": "request/info/get_version.schema.json" }
|
||||
]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user