{
    "$schema": "https://json-schema.org/draft-06/schema",
    "$id": "http://https://prof.bht-berlin.de/pilgrim/schemas/manualconclusion.schema.json",
    "$ref": "#/$defs/ManualConclusion",
    "$defs": {
        "ManualConclusion": {
            "description": "Manual conclusions merged with generated conclusions.",
            "type": "object",
            "additionalProperties": false,
            "required": [
                "course",
                "term",
                "conclusions"
            ],
            "properties": {
                "course": {
                    "description": "Name of the course.",
                    "type": "string"
                },
                "term": {
                    "description": "Term, e.g. WS 2022",
                    "type": "string"
                },
                "conclusions": {
                    "description": "List of manual conclusions.",
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/StudentConclusion"
                    }
                },
                "aliases": {
                    "description": "List of aliases for students.",
                    "type": "array",
                    "items": {
                        "$ref": "#/$defs/Alias"
                    }
                }
            }
        },
        "StudentConclusion": {
            "description": "Manual conclusion for a single student, e.g. in case of plagiary.",
            "type": "object",
            "additionalProperties": false,
            "required": [
                "userName"
            ],
            "properties": {
                "userName": {
                    "description": "Name (First Last) of the student.",
                    "type": "string"
                },
                "totalGrading": {
                    "description": "Total grading of the student.",
                    "type": "float",
                    "minimum": 1,
                    "maximum": 5
                },
                "gradingReason": {
                    "description": "Explanation of the manual correction.",
                    "type": "string"
                },
                "generalRemark": {
                    "description": "General remark.",
                    "type": "string"
                }
            }
        },
        "Alias": {
            "description": "Alias for a student, first name is the current one used in the conclusion.",
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    }
}