Add shared card schemas layouts and renderer
This commit is contained in:
@@ -0,0 +1,524 @@
|
||||
{
|
||||
"$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
|
||||
},
|
||||
"dictionary_refs": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pp_json_root": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"side_margin_tree_layout": {
|
||||
"$ref": "#/$defs/sideMarginLayout"
|
||||
},
|
||||
"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": {
|
||||
"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
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"bibliography": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_tasks_json": {
|
||||
"type": "string"
|
||||
},
|
||||
"report_tasks_tex": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"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"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"task": {
|
||||
"type": "object",
|
||||
"required": ["prompt_tex", "criterion"],
|
||||
"properties": {
|
||||
"prompt_tex": {
|
||||
"type": "string"
|
||||
},
|
||||
"criterion": {
|
||||
"type": "string"
|
||||
},
|
||||
"assessment_criterion_ref": {
|
||||
"type": "string"
|
||||
},
|
||||
"educational_requirement_refs": {
|
||||
"$ref": "#/$defs/stringList"
|
||||
},
|
||||
"learning_effect_refs": {
|
||||
"$ref": "#/$defs/stringList"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"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
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Layout karty pracy",
|
||||
"description": "Schemat pliku templates/karta-*.json używanego przez render_card.py.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"schema",
|
||||
"id",
|
||||
"name",
|
||||
"version",
|
||||
"description",
|
||||
"tokens",
|
||||
"emitters"
|
||||
],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"schema": {
|
||||
"const": "esc-card-template.v1"
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"version": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"approved": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"tokens": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"page": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"format": {
|
||||
"type": "string"
|
||||
},
|
||||
"orientation": {
|
||||
"enum": ["portrait", "landscape"]
|
||||
},
|
||||
"width_px": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
},
|
||||
"height_px": {
|
||||
"type": "number",
|
||||
"exclusiveMinimum": 0
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"grid": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"columns": {
|
||||
"type": "array",
|
||||
"minItems": 3,
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"left_role": {
|
||||
"type": "string"
|
||||
},
|
||||
"right_role": {
|
||||
"type": "string"
|
||||
},
|
||||
"geometry_cm": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"typography": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"colors": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"components": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"block_map": {
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
},
|
||||
"emitters": {
|
||||
"type": "object",
|
||||
"required": ["html", "latex"],
|
||||
"properties": {
|
||||
"html": {
|
||||
"enum": ["classic", "5a", "5b"]
|
||||
},
|
||||
"latex": {
|
||||
"enum": ["classic", "5a", "5b"]
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
},
|
||||
"limitations": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"title": "Manifest serii kart",
|
||||
"description": "Maszynowy opis kolejności repozytoriów kart i ich zadań.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"version",
|
||||
"series",
|
||||
"org",
|
||||
"title",
|
||||
"default_branch",
|
||||
"cards"
|
||||
],
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"const": 1
|
||||
},
|
||||
"series": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
||||
},
|
||||
"org": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"default_branch": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"cards": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/$defs/cardEntry"
|
||||
}
|
||||
}
|
||||
},
|
||||
"$defs": {
|
||||
"cardEntry": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"id",
|
||||
"repo",
|
||||
"branch",
|
||||
"title",
|
||||
"summary",
|
||||
"status",
|
||||
"card_series",
|
||||
"card_number",
|
||||
"card_count",
|
||||
"slug",
|
||||
"version",
|
||||
"build",
|
||||
"tasks"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"repo": {
|
||||
"type": "string",
|
||||
"pattern": "^[a-z0-9][a-z0-9-]*$"
|
||||
},
|
||||
"branch": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"title": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"summary": {
|
||||
"type": "string"
|
||||
},
|
||||
"kind": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"area": {
|
||||
"type": "string"
|
||||
},
|
||||
"card_series": {
|
||||
"type": "string"
|
||||
},
|
||||
"card_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"card_count": {
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"type": "string"
|
||||
},
|
||||
"version": {
|
||||
"type": "string"
|
||||
},
|
||||
"document_uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"pdf": {
|
||||
"type": "string"
|
||||
},
|
||||
"build": {
|
||||
"type": "object",
|
||||
"required": ["driver", "all_target", "clean_target"],
|
||||
"properties": {
|
||||
"driver": {
|
||||
"const": "make"
|
||||
},
|
||||
"all_target": {
|
||||
"type": "string"
|
||||
},
|
||||
"clean_target": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
},
|
||||
"tasks": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "title", "target"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"target": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"build_dir": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
Reference in New Issue
Block a user