{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Registro de pilotaje de aula",
  "type": "object",
  "additionalProperties": false,
  "required": ["date", "responsible_role", "scope", "commit", "planned_minutes", "actual_minutes", "aggregate_evidence", "incidents", "decision"],
  "properties": {
    "date": {"type": "string", "format": "date"},
    "responsible_role": {"type": "string", "minLength": 2},
    "scope": {"type": "object", "required": ["level", "subject", "objective", "class_codes"], "properties": {"level": {"type": "string"}, "subject": {"type": "string"}, "objective": {"type": "string"}, "class_codes": {"type": "array", "minItems": 1, "items": {"type": "string"}}}},
    "commit": {"type": "string", "pattern": "^[0-9a-f]{7,40}$"},
    "planned_minutes": {"type": "integer", "minimum": 1},
    "actual_minutes": {"type": "integer", "minimum": 1},
    "aggregate_evidence": {"type": "object", "required": ["aun_no_observable", "en_desarrollo", "logrado", "profundizado"], "additionalProperties": false, "properties": {"aun_no_observable": {"type": "integer", "minimum": 0}, "en_desarrollo": {"type": "integer", "minimum": 0}, "logrado": {"type": "integer", "minimum": 0}, "profundizado": {"type": "integer", "minimum": 0}}},
    "incidents": {"type": "array", "items": {"type": "string"}},
    "decision": {"enum": ["conservar", "corregir", "volver_a_pilotar", "retirar"]},
    "notes_without_personal_data": {"type": "string"}
  }
}
