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.
This commit is contained in:
2026-09-05 20:40:56 +00:00
parent 952b5e1eca
commit b35fdf9e6a
25 changed files with 301 additions and 119 deletions
@@ -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/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" }
}
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_elastomers.enum.json",
"title": "MaterialTypeElastomersEnum",
"type": "string",
"enum": ["TPU", "TPE", "TPC", "TPR", "OBC", "PEBA"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_fluoropolymers.enum.json",
"title": "MaterialTypeFluoropolymersEnum",
"type": "string",
"enum": ["PVDF", "PTFE", "FEP", "PFA"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_others.enum.json",
"title": "MaterialTypeOthersEnum",
"type": "string",
"enum": ["POM", "PMMA", "PUR", "CUSTOM"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_pla.enum.json",
"title": "MaterialTypePlaEnum",
"type": "string",
"enum": ["PLA", "PHA", "PCL"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_polyamides.enum.json",
"title": "MaterialTypePolyamidesEnum",
"type": "string",
"enum": ["PA", "PA6", "PA6/66", "PA11", "PA12", "PA-MXD6"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_polycarbonates.enum.json",
"title": "MaterialTypePolycarbonatesEnum",
"type": "string",
"enum": ["PC", "PC-PTFE", "PC-ABS", "PC-PBT", "PC-PETG"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_polyesters.enum.json",
"title": "MaterialTypePolyestersEnum",
"type": "string",
"enum": ["PET", "PETG", "PETT", "PCTG", "CPE", "PBT"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_polyolefins.enum.json",
"title": "MaterialTypePolyolefinsEnum",
"type": "string",
"enum": ["PP", "PE", "HDPE", "LDPE", "COC"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_soluble.enum.json",
"title": "MaterialTypeSolubleEnum",
"type": "string",
"enum": ["PVA", "PVB", "BVOH", "TIMEMASS"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_styrenics.enum.json",
"title": "MaterialTypeStyrenicsEnum",
"type": "string",
"enum": ["ABS", "ASA", "HIPS", "SBC", "PS", "SAN", "SMA"]
}
@@ -0,0 +1,7 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/_ultra_polymers.enum.json",
"title": "MaterialTypeUltrapolymersEnum",
"type": "string",
"enum": ["PEEK", "PEKK", "PEI", "ULTEM", "PAEK", "PPS", "PPSU", "PSU", "PES", "PESU", "PAI", "PI"]
}
@@ -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/continuum/common/material_type/fdm.enum.json",
"title": "MaterialTypeFdmEnum",
"oneOf": [
{ "$ref": "./_pla.enum.json" },
{ "$ref": "./_styrenics.enum.json" },
{ "$ref": "./_polyesters.enum.json" },
{ "$ref": "./_polyamides.enum.json" },
{ "$ref": "./_polycarbonates.enum.json" },
{ "$ref": "./_elastomers.enum.json" },
{ "$ref": "./_ultra_polymers.enum.json" },
{ "$ref": "./_polyolefins.enum.json" },
{ "$ref": "./_fluoropolymers.enum.json" },
{ "$ref": "./_soluble.enum.json" },
{ "$ref": "./_others.enum.json" }
]
}
@@ -0,0 +1,9 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/common/material_type/modifier.enum.json",
"title": "MaterialTypeModifierFdmEnum",
"type": "string",
"enum": [
"", "+", "LW", "CF", "GF", "ESD", "FR", "Wood", "Metal", "Pure"
]
}
@@ -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/continuum/common/printer_type.enum.json",
"title": "PrinterTypeEnum",
"type": "string",
"enum": [
"SLA",
"DLP",
"FDM",
"SLS",
"SLM",
"EBM",
"LOM",
"BJ",
"MJ"
]
}