{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://dotbabel.dev/schemas/dotbabel.quality-report.schema.json",
  "title": "dotbabel-v1 quality report",
  "type": "object",
  "additionalProperties": false,
  "required": ["schema_version", "metrics", "findings"],
  "properties": {
    "schema_version": { "const": 1 },
    "metrics": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": ["rule", "actual"],
        "properties": {
          "rule": { "type": "string", "minLength": 1 },
          "actual": { "type": "number" },
          "path": { "type": "string" },
          "symbol": { "type": "string" },
          "key": { "type": "string" }
        }
      }
    },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": true,
        "required": ["rule", "message"],
        "properties": {
          "rule": { "type": "string", "minLength": 1 },
          "message": { "type": "string", "minLength": 1 },
          "fingerprint": { "type": "string" },
          "path": { "type": "string" },
          "line": { "type": "integer", "minimum": 1 },
          "severity": { "type": "string" }
        }
      }
    }
  }
}
