From c192f203ff2166001052b256952e638992441430 Mon Sep 17 00:00:00 2001 From: Florian Fischer <florian.fischer-2@mni.thm.de> Date: Tue, 14 Jan 2025 14:00:11 +0100 Subject: [PATCH] adds json schema to docs --- docs/index.rst | 2 +- docs/schema.rst | 288 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 289 insertions(+), 1 deletion(-) create mode 100644 docs/schema.rst diff --git a/docs/index.rst b/docs/index.rst index f69f289..8610bde 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -5,4 +5,4 @@ JSON Schema for the Quality Control Format :maxdepth: 2 :caption: Inhalt: - Hier steht dann das Schema! + schema diff --git a/docs/schema.rst b/docs/schema.rst new file mode 100644 index 0000000..6dc44d5 --- /dev/null +++ b/docs/schema.rst @@ -0,0 +1,288 @@ +.. code-block:: json + { + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "JSON schema quality control lotsize 1", + "type": "object", + "properties": { + "$version": { + "type": "string" + }, + "quality_control_info": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "cad_model": { + "type": "string" + }, + "manufacturing_profile": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "material": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "vendor": { + "type": "string" + }, + "weight": { + "type": "string" + }, + "material_kind": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "processing_temp": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "processing_temp" + ] + } + }, + "required": [ + "id", + "name", + "vendor", + "weight", + "material_kind" + ] + }, + "layer_height": { + "type": "number" + }, + "scale_settings": { + "type": "object", + "properties": { + "x": { + "type": "number" + }, + "y": { + "type": "number" + }, + "z": { + "type": "number" + }, + "id": { + "type": "string" + } + }, + "required": [ + "x", + "y", + "z", + "id" + ] + }, + "nozzle_diameter": { + "type": "number" + } + }, + "required": [ + "id", + "material", + "layer_height", + "scale_settings", + "nozzle_diameter" + ] + }, + "customization": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "content": { + "type": "string" + }, + "position": { + "type": "array", + "items": { + "type": "number" + } + }, + "customization_kind": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "required": [ + "id", + "content", + "position", + "customization_kind" + ] + } + }, + "scan": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "data": { + "type": "string" + }, + "scan_profile": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "unit": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "factor_to_m": { + "type": "number" + } + }, + "required": [ + "id", + "name", + "factor_to_m" + ] + }, + "model": { + "type": "string" + }, + "vendor": { + "type": "string" + }, + "model_no": { + "type": "string" + }, + "file_type": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + }, + "required": [ + "id", + "name" + ] + } + }, + "required": [ + "id", + "unit", + "model", + "vendor", + "model_no", + "file_type" + ] + } + }, + "required": [ + "id", + "data", + "scan_profile" + ] + } + }, + "requirements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "tolerance": { + "type": "number" + }, + "requirement_type": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "array", + "items": { + "type": "number" + } + }, + "direction": { + "type": "array", + "items": { + "type": "number" + } + } + }, + "required": [ + "id", + "name", + "position", + "direction" + ] + } + }, + "required": [ + "id", + "tolerance", + "requirement_type" + ] + } + } + }, + "required": [ + "id", + "cad_model", + "manufacturing_profile", + "customization", + "scan", + "requirements" + ] + } + }, + "required": [ + "$version", + "quality_control_info" + ] + } -- GitLab