Move bambulab JSON Schemas here from continuum-proxy; restructure

Schemas (any notation - proto, JSON Schema) belong in the schemas repo
regardless of how many languages currently consume them; that's what
makes this 'the schemas repo'. Rust-only code (the hand-written structs
in continuum-proxy's bambu_commands/) is a different category and stays
where it was.

Also restructured per readability feedback:
- envelope.schema.json moved out of v1/ to the bambulab/ root - it's
  shared across protocol generations, not v1-specific, same principle
  already applied to the (now-removed) proto/bambulab/common.proto.
- v1/ split into v1/request/ and v1/report/, one file per command in
  each, instead of *.request.schema.json / *.response.schema.json
  filename suffixes doing the same job less clearly. The two top-level
  dispatcher schemas (matching BambuRequest/BambuReport) stay at the v1/
  root since they aren't themselves a single command's schema.

Re-verified after restructuring, not just moved and assumed still
correct:  resolution now has to handle a real basename collision
(get_version.schema.json exists in both request/ and report/) — switched
the validation approach to register schemas by  (their actual base
URI) rather than by filename, which is what makes relative  resolve
correctly here. All three real examples plus the negative tests from the
original version still pass.
This commit is contained in:
2026-08-28 22:58:18 +00:00
parent bc4ee8690a
commit 8d4a08e36d
9 changed files with 208 additions and 0 deletions
@@ -0,0 +1,17 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://continuum.internal/schemas/bambulab/v1/request/pushall.schema.json",
"title": "PushallRequest",
"allOf": [
{ "$ref": "../../envelope.schema.json" },
{
"type": "object",
"properties": {
"command": { "const": "pushall" },
"version": { "type": "integer" },
"push_target": { "type": "integer" }
},
"required": ["version", "push_target"]
}
]
}