Files
continuum-schemas/schemas/continuum/common/envelope.schema.json
T
octoturgeandClaude Sonnet 5 1bfd883a9b Restructure continuum/v1 domain schemas: material/printer/vendor model
Replaces the old flat material/print_job/print_params/template schemas
with a richer structure: schemas/continuum/common/ for shared envelope +
enums (material_type taxonomy, printer_type), schemas/continuum/v1/
material/ (material + spool) and printer/ (printer_info/firmware_info/
module_info), plus a new vendor.schema.json.

Fixes found while verifying (all files added in this pass, so nothing
downstream depended on the broken paths yet):
- 5 broken $refs to common/envelope.schema.json - files under the new
  v1/material/ and v1/printer/ subdirectories need ../../common/, not
  ../common/ (one more level of nesting than vendor.schema.json, which
  sits directly under v1/).
- $id in 5 files (material.schema.json, spool.schema.json,
  firmware_info/module_info/printer_info.schema.json) didn't match
  their real path - mostly copy-paste from before the material/printer/
  subdirectories existed.
- $id in all 13 files under common/material_type/ and
  common/printer_type.enum.json said v1/ instead of common/.
- material.schema.json's hardness_value used minItems (an array-only
  keyword, silently ignored on an integer) where minimum: 0 was
  evidently intended, matching the maximum: 100 next to it.

Not fixed, needs a decision rather than a mechanical correction:
- spool.schema.json's `required` list is material.schema.json's
  fields (material_type, min_nozzle_temp, ...), none of which exist in
  spool's own properties (material, empty_spool_weight, ...) - copy-paste
  left over from material.schema.json. continuum-schema-instance's error
  message points right at it: "'material_type' is required but has no
  schema in properties".
- envelope.schema.json's created_by/updated_by are typed
  format: date-time (copy-pasted from created_at/updated_at) - almost
  certainly meant to identify an actor, not a timestamp.
- printer_info.schema.json requires `host` via a oneOf (ipv4-or-ipv6
  format) nested inside an allOf branch - continuum-schema-instance
  doesn't merge a oneOf nested inside allOf (only plain
  properties/required), so it currently builds an empty {} for this
  schema; also worth confirming ipv4/ipv6-only is intended, since it'd
  reject a DNS hostname.
- print_job.schema.json and print_params.schema.json were removed with
  no replacement under the new structure - confirm that's intentional.

Also: the hand-written TypeBox schemas (ts-types) and serde structs
(rust-types) for Material/Template/PrintJob/PrintParameters now describe
the OLD flat shape and are out of sync with this restructure - per this
repo's hand-sync convention (see README), they need updating to match,
or the old ones should be removed if these new schemas supersede them.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MWQVtBGxHYLkVw2kBupd5g
2026-09-05 20:40:56 +00:00

14 lines
570 B
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/envelope.schema.json",
"title": "MessageEnvelope",
"type": "object",
"properties": {
"id": { "type": "string", "format": "uuid" },
"created_at": { "type": "string", "format": "date-time" },
"created_by": { "type": "string", "format": "date-time" },
"updated_at": { "type": "string", "format": "date-time" },
"updated_by": { "type": "string", "format": "date-time" }
}
}