{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "questions.schema.json", "title": "LPIC-Simulator: Fragendatei", "description": "Fragenpaket für eine Prüfung. Datei-Header in 'meta' (Regel headers.md). Fachliche Regeln (genau 5 Optionen, Erläuterung je Option) prüft zusätzlich tools/build_bank.py.", "type": "object", "required": ["format", "exam", "questions"], "additionalProperties": false, "properties": { "$schema": { "type": "string" }, "format": { "const": "lpic-sim-questions" }, "meta": { "type": "object", "properties": { "file": { "type": "string" }, "brief": { "type": "string" }, "author": { "type": "string" }, "owner": { "type": "string" }, "assist": { "type": "string" }, "version": { "type": "string" } } }, "exam": { "type": "string", "description": "id der Prüfung aus exam.json, z. B. lpic1-101", "pattern": "^[a-z0-9-]+$" }, "questions": { "type": "array", "items": { "$ref": "#/$defs/question" } } }, "$defs": { "question": { "type": "object", "required": ["id", "objective", "type", "question", "explanation"], "additionalProperties": false, "properties": { "id": { "type": "string", "pattern": "^[0-9]{3}\\.[0-9]+-[0-9]{3}$", "description": "-, z. B. 103.1-004" }, "objective": { "type": "string", "pattern": "^[0-9]{3}\\.[0-9]+$" }, "type": { "enum": ["single", "multi", "fill"], "description": "single: genau 1 richtig · multi: 2–4 richtig (Anzahl wird angezeigt) · fill: Lückentext" }, "lang": { "type": "string", "default": "de" }, "difficulty": { "type": "integer", "minimum": 1, "maximum": 3 }, "question": { "type": "string", "description": "Fragetext; `Inline-Code` in Backticks, **fett** möglich" }, "code": { "type": "string", "description": "optionaler mehrzeiliger Block (Ausgabe, Datei, Befehl)" }, "options": { "type": "array", "minItems": 5, "maxItems": 5, "items": { "type": "object", "required": ["id", "text", "correct", "explanation"], "additionalProperties": false, "properties": { "id": { "enum": ["a", "b", "c", "d", "e"] }, "text": { "type": "string" }, "correct": { "type": "boolean" }, "explanation": { "type": "string", "description": "Warum diese Option richtig bzw. falsch ist" } } } }, "answers": { "type": "array", "minItems": 1, "items": { "type": "string" }, "description": "fill: akzeptierte Antworten (erste = Musterlösung)" }, "case_sensitive": { "type": "boolean", "default": true }, "explanation": { "type": "string", "description": "Gesamterläuterung zur Frage" }, "references": { "type": "array", "items": { "type": "string" }, "description": "z. B. man 8 modprobe" }, "review": { "type": "object", "description": "Prüfvermerk. Fehlt er, gilt pending. rejected wird nie in die Bank übernommen, mit --approved-only nur approved.", "required": ["status"], "additionalProperties": false, "properties": { "status": { "enum": ["pending", "approved", "rejected"] }, "by": { "type": "string", "description": "Prüfer (Name oder Rolle)" }, "date": { "type": "string", "pattern": "^\\d{4}-\\d{2}-\\d{2}$" }, "note": { "type": "string", "description": "Begründung, v. a. bei rejected" } } } }, "allOf": [ { "if": { "properties": { "type": { "const": "fill" } } }, "then": { "required": ["answers"] }, "else": { "required": ["options"] } } ] } } }