Files
continuum-schemas/schemas/continuum/v1/material/material.schema.json
T
octoturge b35fdf9e6a 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.
2026-09-05 20:40:56 +00:00

41 lines
1.5 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/material/material.schema.json",
"title": "MaterialSchema",
"allOf": [
{ "$ref": "../../common/envelope.schema.json" },
{
"type": "object",
"properties": {
"material_type": { "$ref": "../../common/material_type/fdm.enum.json" },
"material_modifier": {
"$ref": "../../common/material_type/modifier.enum.json"
},
"min_nozzle_temp": { "type": "integer", "minimum": 0 },
"max_nozzle_temp": { "type": "integer", "minimum": 0 },
"min_bed_temp": { "type": "integer", "minimum": 0 },
"max_bed_temp": { "type": "integer", "minimum": 0 },
"min_chamber_temp": { "type": "integer", "minimum": 0 },
"max_chamber_temp": { "type": "integer", "minimum": 0 },
"density": { "type": "number" },
"name": { "type": "string" },
"hardness_value": { "type": "integer", "minimum": 0, "maximum": 100 },
"hardness_scale": { "type": "string", "enum": ["A", "D"] },
"vendor": { "$ref": "../vendor.schema.json" }
},
"required": [
"material_type",
"material_modifier",
"min_nozzle_temp",
"max_nozzle_temp",
"min_bed_temp",
"max_bed_temp",
"min_chamber_temp",
"max_chamber_temp",
"density",
"name"
]
}
]
}