diff --git a/schemas/continuum/common/envelope.schema.json b/schemas/continuum/common/envelope.schema.json new file mode 100644 index 0000000..d0810da --- /dev/null +++ b/schemas/continuum/common/envelope.schema.json @@ -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" } + } +} diff --git a/schemas/continuum/common/material_type/_elastomers.enum.json b/schemas/continuum/common/material_type/_elastomers.enum.json new file mode 100644 index 0000000..91eb8d2 --- /dev/null +++ b/schemas/continuum/common/material_type/_elastomers.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_fluoropolymers.enum.json b/schemas/continuum/common/material_type/_fluoropolymers.enum.json new file mode 100644 index 0000000..a9504c0 --- /dev/null +++ b/schemas/continuum/common/material_type/_fluoropolymers.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_others.enum.json b/schemas/continuum/common/material_type/_others.enum.json new file mode 100644 index 0000000..b7975e0 --- /dev/null +++ b/schemas/continuum/common/material_type/_others.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_pla.enum.json b/schemas/continuum/common/material_type/_pla.enum.json new file mode 100644 index 0000000..15aa0cc --- /dev/null +++ b/schemas/continuum/common/material_type/_pla.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_polyamides.enum.json b/schemas/continuum/common/material_type/_polyamides.enum.json new file mode 100644 index 0000000..693b7e2 --- /dev/null +++ b/schemas/continuum/common/material_type/_polyamides.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_polycarbonates.enum.json b/schemas/continuum/common/material_type/_polycarbonates.enum.json new file mode 100644 index 0000000..2caba44 --- /dev/null +++ b/schemas/continuum/common/material_type/_polycarbonates.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_polyesters.enum.json b/schemas/continuum/common/material_type/_polyesters.enum.json new file mode 100644 index 0000000..fd0ecfe --- /dev/null +++ b/schemas/continuum/common/material_type/_polyesters.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_polyolefins.enum.json b/schemas/continuum/common/material_type/_polyolefins.enum.json new file mode 100644 index 0000000..0e1a33d --- /dev/null +++ b/schemas/continuum/common/material_type/_polyolefins.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_soluble.enum.json b/schemas/continuum/common/material_type/_soluble.enum.json new file mode 100644 index 0000000..7113fc3 --- /dev/null +++ b/schemas/continuum/common/material_type/_soluble.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_styrenics.enum.json b/schemas/continuum/common/material_type/_styrenics.enum.json new file mode 100644 index 0000000..598382a --- /dev/null +++ b/schemas/continuum/common/material_type/_styrenics.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/_ultra_polymers.enum.json b/schemas/continuum/common/material_type/_ultra_polymers.enum.json new file mode 100644 index 0000000..0370d3c --- /dev/null +++ b/schemas/continuum/common/material_type/_ultra_polymers.enum.json @@ -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"] +} diff --git a/schemas/continuum/common/material_type/fdm.enum.json b/schemas/continuum/common/material_type/fdm.enum.json new file mode 100644 index 0000000..02818a0 --- /dev/null +++ b/schemas/continuum/common/material_type/fdm.enum.json @@ -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" } + ] +} diff --git a/schemas/continuum/common/material_type/modifier.enum.json b/schemas/continuum/common/material_type/modifier.enum.json new file mode 100644 index 0000000..61ce96f --- /dev/null +++ b/schemas/continuum/common/material_type/modifier.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" + ] +} diff --git a/schemas/continuum/common/printer_type.enum.json b/schemas/continuum/common/printer_type.enum.json new file mode 100644 index 0000000..952971a --- /dev/null +++ b/schemas/continuum/common/printer_type.enum.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/continuum/common/printer_type.enum.json", + "title": "PrinterTypeEnum", + "type": "string", + "enum": [ + "SLA", + "DLP", + "FDM", + "SLS", + "SLM", + "EBM", + "LOM", + "BJ", + "MJ" + ] +} diff --git a/schemas/continuum/v1/material.schema.json b/schemas/continuum/v1/material.schema.json deleted file mode 100644 index 32f79aa..0000000 --- a/schemas/continuum/v1/material.schema.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/material.schema.json", - "title": "MaterialProfile", - "type": "object", - "properties": { - "id": { "type": "string", "format": "uuid" }, - "name": { "type": "string", "minLength": 1 }, - "filamentType": { "type": "string", "minLength": 1 }, - "nozzleTempC": { "type": "number" }, - "bedTempC": { "type": "number" }, - "densityGCm3": { "type": "number" }, - "colorHex": { "type": "string", "pattern": "^#[0-9a-fA-F]{6}$" } - }, - "required": [ - "id", - "name", - "filamentType", - "nozzleTempC", - "bedTempC", - "densityGCm3", - "colorHex" - ], - "additionalProperties": false -} diff --git a/schemas/continuum/v1/material/material.schema.json b/schemas/continuum/v1/material/material.schema.json new file mode 100644 index 0000000..7519f49 --- /dev/null +++ b/schemas/continuum/v1/material/material.schema.json @@ -0,0 +1,40 @@ +{ + "$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" + ] + } + ] +} diff --git a/schemas/continuum/v1/material/spool.schema.json b/schemas/continuum/v1/material/spool.schema.json new file mode 100644 index 0000000..56688aa --- /dev/null +++ b/schemas/continuum/v1/material/spool.schema.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/material/spool.schema.json", + "title": "SpoolSchema", + "allOf": [ + { "$ref": "../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "material": { "$ref": "./material.schema.json" }, + "empty_spool_weight": { "type": "number" }, + "max_material_weight": { "type": "number" }, + "current_material_weight": { "type": "number" } + }, + "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" + ] + } + ] +} diff --git a/schemas/continuum/v1/print_job.schema.json b/schemas/continuum/v1/print_job.schema.json deleted file mode 100644 index d4b542d..0000000 --- a/schemas/continuum/v1/print_job.schema.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/print_job.schema.json", - "title": "PrintJob", - "type": "object", - "properties": { - "id": { "type": "string", "format": "uuid" }, - "farmId": { "type": "string", "format": "uuid" }, - "printerId": { "type": "string", "format": "uuid" }, - "templateId": { "type": "string", "format": "uuid" }, - "status": { - "type": "string", - "enum": [ - "PRINT_JOB_STATUS_UNSPECIFIED", - "PRINT_JOB_STATUS_QUEUED", - "PRINT_JOB_STATUS_PRINTING", - "PRINT_JOB_STATUS_PAUSED", - "PRINT_JOB_STATUS_COMPLETED", - "PRINT_JOB_STATUS_FAILED", - "PRINT_JOB_STATUS_CANCELLED" - ] - }, - "progressPercent": { "type": "number", "minimum": 0, "maximum": 100 }, - "startedAtUnix": { "type": "integer" }, - "completedAtUnix": { "type": "integer" }, - "gcodeFileKey": { "type": "string", "minLength": 1 } - }, - "required": [ - "id", - "farmId", - "printerId", - "templateId", - "status", - "progressPercent", - "startedAtUnix", - "completedAtUnix", - "gcodeFileKey" - ], - "additionalProperties": false -} diff --git a/schemas/continuum/v1/print_params.schema.json b/schemas/continuum/v1/print_params.schema.json deleted file mode 100644 index 41183ce..0000000 --- a/schemas/continuum/v1/print_params.schema.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/print_params.schema.json", - "title": "PrintParameters", - "type": "object", - "properties": { - "layerHeightMm": { "type": "number", "minimum": 0.04, "maximum": 1.0 }, - "infillPercent": { "type": "integer", "minimum": 0, "maximum": 100 }, - "infillPattern": { "type": "string", "minLength": 1 }, - "printSpeedMmS": { "type": "number", "minimum": 0 }, - "supportsEnabled": { "type": "boolean" }, - "wallCount": { "type": "integer", "minimum": 0 } - }, - "required": [ - "layerHeightMm", - "infillPercent", - "infillPattern", - "printSpeedMmS", - "supportsEnabled", - "wallCount" - ], - "additionalProperties": false -} diff --git a/schemas/continuum/v1/printer/firmware_info.schema.json b/schemas/continuum/v1/printer/firmware_info.schema.json new file mode 100644 index 0000000..4e58175 --- /dev/null +++ b/schemas/continuum/v1/printer/firmware_info.schema.json @@ -0,0 +1,16 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/printer/firmware_info.schema.json", + "title": "FirmwareInfoSchema", + "allOf": [ + { "$ref": "../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "version": { "type": "string" }, + "product_name": { "type": "string" } + }, + "required": ["version"] + } + ] +} diff --git a/schemas/continuum/v1/printer/module_info.schema.json b/schemas/continuum/v1/printer/module_info.schema.json new file mode 100644 index 0000000..498d0ef --- /dev/null +++ b/schemas/continuum/v1/printer/module_info.schema.json @@ -0,0 +1,20 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/printer/module_info.schema.json", + "title": "ModuleInfoSchema", + "allOf": [ + { "$ref": "../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "product_name": { "type": "string" }, + "sn": { "type": "string" }, + "visible": { "type": "boolean" }, + "firmware_version": { "type": "string" }, + "hardware_version": { "type": "string" } + }, + "required": ["name", "firmware_version"] + } + ] +} diff --git a/schemas/continuum/v1/printer/printer_info.schema.json b/schemas/continuum/v1/printer/printer_info.schema.json new file mode 100644 index 0000000..f0a3812 --- /dev/null +++ b/schemas/continuum/v1/printer/printer_info.schema.json @@ -0,0 +1,38 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/printer/printer_info.schema.json", + "title": "PrinterInfoSchema", + "allOf": [ + { "$ref": "../../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "sn": { "type": "string" }, + "firmware_info": { "$ref": "./firmware_info.schema.json" }, + "modules": { + "type": "array", + "items": { "$ref": "./module_info.schema.json" } + }, + "vendor": { "$ref": "../vendor.schema.json" } + } + }, + { + "oneOf": [ + { + "type": "object", + "properties": { + "host": { "type": "string", "format": "ipv4" } + }, + "required": ["host"] + }, + { + "type": "object", + "properties": { + "host": { "type": "string", "format": "ipv6" } + }, + "required": ["host"] + } + ] + } + ] +} diff --git a/schemas/continuum/v1/template.schema.json b/schemas/continuum/v1/template.schema.json deleted file mode 100644 index 196fa92..0000000 --- a/schemas/continuum/v1/template.schema.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "$schema": "https://json-schema.org/draft/2020-12/schema", - "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/template.schema.json", - "title": "Template", - "type": "object", - "properties": { - "id": { "type": "string", "format": "uuid" }, - "name": { "type": "string", "minLength": 1 }, - "description": { "type": "string" }, - "ownerId": { "type": "string", "format": "uuid" }, - "modelFileKey": { "type": "string", "minLength": 1 }, - "material": { "$ref": "material.schema.json" }, - "printParameters": { "$ref": "print_params.schema.json" }, - "createdAtUnix": { "type": "integer" }, - "updatedAtUnix": { "type": "integer" }, - "tags": { "type": "array", "items": { "type": "string" } } - }, - "required": [ - "id", - "name", - "description", - "ownerId", - "modelFileKey", - "material", - "printParameters", - "createdAtUnix", - "updatedAtUnix", - "tags" - ], - "additionalProperties": false -} diff --git a/schemas/continuum/v1/vendor.schema.json b/schemas/continuum/v1/vendor.schema.json new file mode 100644 index 0000000..37ecdd4 --- /dev/null +++ b/schemas/continuum/v1/vendor.schema.json @@ -0,0 +1,24 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://git.octoturge.com/Continuum/continuum-schemas/raw/branch/main/schemas/continuum/v1/vendor.schema.json", + "title": "VendorSchema", + "type": "object", + "allOf": [ + { "$ref": "../common/envelope.schema.json" }, + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "email": { "type": "string", "format": "email" }, + "phone": { "type": "string" }, + "address_line1": { "type": "string" }, + "address_line2": { "type": "string" }, + "postal_code": { "type": "string" }, + "city": { "type": "string" }, + "county": { "type": "string" }, + "country_code": { "type": "string" } + }, + "required": ["name"] + } + ] +}