{ "$schema": "https://json-schema.org/draft/2020-12/schema", "title": "Źródło karty pracy", "description": "Schemat wspólnego źródła treści generowanego do TeX i HTML.", "type": "object", "required": [ "schema", "card", "generated", "template", "learning_effects", "assessment_criteria", "educational_requirements", "sections", "tasks", "tasks_order" ], "properties": { "$schema": { "type": "string" }, "schema": { "const": "esc-card-source.v1" }, "card": { "$ref": "#/$defs/card" }, "generated": { "$ref": "#/$defs/generated" }, "template": { "type": "string", "minLength": 1 }, "title_block": { "$ref": "#/$defs/titleBlock" }, "dictionary_refs": { "type": "object", "properties": { "pp_json_root": { "type": "string" } }, "additionalProperties": true }, "side_margin_tree_layout": { "$ref": "#/$defs/sideMarginLayout" }, "reference_registries": { "type": "array", "items": { "type": "object", "required": ["uuid", "source"], "properties": { "uuid": { "$ref": "#/$defs/uuid" }, "source": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "learning_effects": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/learningEffect" } }, "assessment_criteria": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/assessmentCriterion" } }, "educational_requirements": { "type": "object", "minProperties": 1, "additionalProperties": { "$ref": "#/$defs/educationalRequirement" } }, "sections": { "type": "array", "items": { "$ref": "#/$defs/section" } }, "tasks": { "type": "object", "additionalProperties": { "$ref": "#/$defs/task" } }, "tasks_order": { "type": "array", "uniqueItems": true, "items": { "type": "string" } }, "model_block": { "type": "object", "properties": { "steps": { "$ref": "#/$defs/stringList" } }, "additionalProperties": true }, "code_block": { "type": "object", "properties": { "blocks": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "slug": { "type": "string" }, "goal": { "type": "string" }, "web_steps": { "$ref": "#/$defs/stringList" }, "web_commands": { "type": "array", "items": { "type": "object", "required": ["label", "command"], "properties": { "label": { "type": "string" }, "command": { "type": "string" } }, "additionalProperties": true } } }, "additionalProperties": true } } }, "additionalProperties": true }, "hardware_procedure": { "type": "array", "items": { "$ref": "#/$defs/procedureStep" } } }, "$defs": { "uuid": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$" }, "externalReference": { "type": "object", "required": ["kind", "registry_uuid", "uuid"], "properties": { "kind": { "enum": ["strategy", "card", "content", "formula"] }, "registry_uuid": { "$ref": "#/$defs/uuid" }, "uuid": { "$ref": "#/$defs/uuid" } }, "additionalProperties": false }, "stringList": { "type": "array", "items": { "type": "string" } }, "card": { "type": "object", "required": [ "id", "series", "number", "count", "slug", "title", "version", "uuid" ], "properties": { "id": { "type": "string", "minLength": 1 }, "series": { "type": "string", "minLength": 1 }, "series_title": { "type": "string", "minLength": 1 }, "number": { "type": "string", "minLength": 1 }, "count": { "type": "string", "minLength": 1 }, "slug": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" }, "title": { "type": "string", "minLength": 1 }, "version": { "type": "string", "minLength": 1 }, "uuid": { "type": "string", "minLength": 1 } }, "additionalProperties": true }, "generated": { "type": "object", "required": ["tex", "html"], "properties": { "tex": { "type": "string", "minLength": 1 }, "html": { "type": "string", "minLength": 1 }, "html_css": { "type": "string" }, "html_tree_inspector": { "type": "boolean" }, "bibliography": { "type": "string" }, "report_tasks_json": { "type": "string" }, "report_tasks_tex": { "type": "string" } }, "additionalProperties": false }, "titleBlock": { "type": "object", "description": "Tekstowa tabliczka w nagłówku: metadane dokumentu oraz opcjonalny adres kodowany w QR.", "properties": { "category": { "type": "string" }, "standard": { "type": "string" }, "prepared_by": { "type": "string" }, "prepared_on": { "type": "string" }, "checked_by": { "type": "string" }, "approved_by": { "type": "string" }, "title": { "type": "string" }, "url": { "type": "string", "pattern": "^https?://" }, "repository_url": { "type": "string", "pattern": "^https?://" }, "url_host_uuid": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "url_port": { "type": ["string", "integer"] }, "doc_uuid": { "type": "string", "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" }, "revision": { "type": "string" }, "issued_on": { "type": "string" }, "series": { "type": "string" }, "document_type": { "type": "string" }, "tool": { "type": "string" }, "sheet": { "type": "string", "description": "Legacy static sheet label. Repeated page headers compute page/total dynamically." }, "show_qr": { "type": "boolean" }, "show_repository_qr": { "type": "boolean" }, "height_cm": { "enum": [2.6, 3] }, "repeat_on_every_page": { "const": true }, "replace_front_matter": { "const": true } }, "allOf": [ { "if": { "required": ["show_qr"], "properties": { "show_qr": { "const": true } } }, "then": { "anyOf": [ { "required": ["url"] }, { "required": ["url_host_uuid", "doc_uuid"] } ] } }, { "if": { "required": ["show_repository_qr"], "properties": { "show_repository_qr": { "const": true } } }, "then": { "required": ["repository_url"] } } ], "additionalProperties": false }, "sideMarginLayout": { "type": "object", "required": ["columns"], "properties": { "columns": { "type": "array", "minItems": 2, "items": { "type": "object", "required": ["id", "label", "side", "tree"], "properties": { "id": { "enum": ["ogolne", "zawodowe"] }, "label": { "type": "string" }, "side": { "enum": ["left", "right"] }, "tree": { "type": "string" }, "description": { "type": "string" } }, "additionalProperties": true } } }, "additionalProperties": true }, "learningEffect": { "type": "object", "required": ["text"], "properties": { "text": { "type": "string", "minLength": 1 }, "label": { "type": "string" }, "bloom_level": { "type": "string" }, "assessment_criteria": { "$ref": "#/$defs/stringList" } }, "additionalProperties": true }, "assessmentCriterion": { "type": "object", "required": ["text", "learning_effects"], "properties": { "text": { "type": "string", "minLength": 1 }, "learning_effects": { "$ref": "#/$defs/stringList" } }, "additionalProperties": true }, "educationalRequirement": { "type": "object", "required": ["text", "learning_effects", "learning_tree"], "properties": { "text": { "type": "string", "minLength": 1 }, "label": { "type": "string" }, "learning_effects": { "$ref": "#/$defs/stringList" }, "learning_tree": { "type": "object", "required": ["ogolne", "zawodowe"], "properties": { "schema": { "type": "string" }, "policy": { "type": "string" }, "ogolne": { "type": "array", "items": { "$ref": "#/$defs/treeItem" } }, "zawodowe": { "type": "array", "items": { "$ref": "#/$defs/treeItem" } } }, "additionalProperties": true } }, "additionalProperties": true }, "treeItem": { "type": "object", "required": ["tree_id", "effect_ref", "display", "text", "kw"], "properties": { "tree_id": { "type": "string", "minLength": 1 }, "effect_ref": { "type": "string", "minLength": 1 }, "display": { "type": "string", "minLength": 1 }, "text": { "type": "string", "minLength": 1 }, "source": { "type": "string" }, "official": { "type": "string" }, "local": { "type": "string" }, "kind": { "type": "string" }, "kw": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/treeCriterion" } } }, "additionalProperties": true }, "treeCriterion": { "type": "object", "required": ["criterion_ref", "display", "text"], "properties": { "criterion_ref": { "type": "string", "minLength": 1 }, "display": { "type": "string", "minLength": 1 }, "text": { "type": "string", "minLength": 1 }, "source": { "type": "string" }, "official": { "type": "string" }, "local": { "type": "string" }, "kind": { "type": "string" } }, "additionalProperties": true }, "section": { "type": "object", "required": ["title"], "properties": { "title": { "type": "string", "minLength": 1 }, "content_kind": { "type": "string" }, "content_tex": { "type": "string" }, "area_tree_refs": { "$ref": "#/$defs/stringList" }, "educational_requirement_refs": { "$ref": "#/$defs/stringList" }, "learning_effect_refs": { "$ref": "#/$defs/stringList" }, "assessment_criterion_refs": { "$ref": "#/$defs/stringList" }, "steps": { "type": "array", "items": { "$ref": "#/$defs/sectionStep" } }, "assets": { "type": "array", "items": { "$ref": "#/$defs/sectionAsset" } } }, "additionalProperties": true }, "sectionAsset": { "type": "object", "required": ["path", "caption", "label"], "properties": { "path": { "type": "string", "minLength": 1 }, "caption": { "type": "string", "minLength": 1 }, "label": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9:.-]*$" }, "alt": { "type": "string" }, "kind": { "enum": ["screenshot", "figure", "diagram"] }, "width": { "type": "number", "minimum": 0.1, "maximum": 1.0 }, "full_size_link": { "type": "boolean" } }, "additionalProperties": false }, "sectionStep": { "type": "object", "required": ["id", "title", "tree_refs"], "properties": { "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "tree_refs": { "type": "array", "minItems": 1, "items": { "type": "string" } }, "educational_requirement_refs": { "$ref": "#/$defs/stringList" }, "learning_effect_refs": { "$ref": "#/$defs/stringList" }, "assessment_criterion_refs": { "$ref": "#/$defs/stringList" }, "equation_refs": { "$ref": "#/$defs/stringList" }, "figure_refs": { "$ref": "#/$defs/stringList" }, "references": { "type": "array", "items": { "$ref": "#/$defs/externalReference" } } }, "additionalProperties": true }, "task": { "type": "object", "required": ["prompt_tex", "criterion"], "properties": { "prompt_tex": { "type": "string" }, "criterion": { "type": "string" }, "title": { "type": "string", "minLength": 1 }, "uuid": { "type": "string", "minLength": 1 }, "flow": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/taskFlowItem" } }, "assessment_criterion_ref": { "type": "string" }, "educational_requirement_refs": { "$ref": "#/$defs/stringList" }, "learning_effect_refs": { "$ref": "#/$defs/stringList" } }, "additionalProperties": true }, "taskFlowItem": { "oneOf": [ { "$ref": "#/$defs/taskBlock" }, { "$ref": "#/$defs/taskExercise" } ] }, "taskBlock": { "type": "object", "required": ["kind", "id", "title"], "properties": { "kind": { "const": "block" }, "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "content_tex": { "type": "string" }, "steps": { "type": "array", "items": { "$ref": "#/$defs/taskBlockStep" } } }, "additionalProperties": false }, "taskBlockStep": { "type": "object", "required": ["id", "title"], "properties": { "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "content_tex": { "type": "string" }, "tree_refs": { "$ref": "#/$defs/stringList" }, "references": { "type": "array", "items": { "$ref": "#/$defs/externalReference" } } }, "additionalProperties": false }, "taskExercise": { "type": "object", "required": ["kind", "id", "title", "prompt_tex", "criterion"], "properties": { "kind": { "const": "exercise" }, "id": { "type": "string", "minLength": 1 }, "title": { "type": "string", "minLength": 1 }, "prompt_tex": { "type": "string", "minLength": 1 }, "evidence_tex": { "type": "string" }, "criterion": { "type": "string", "minLength": 1 }, "based_on": { "$ref": "#/$defs/stringList" } }, "additionalProperties": false }, "procedureStep": { "type": "object", "required": ["step", "action", "condition"], "properties": { "step": { "type": "string" }, "action": { "type": "string", "minLength": 1 }, "condition": { "type": "string", "minLength": 1 } }, "additionalProperties": false } }, "additionalProperties": true }