{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peppolstatus-com/json-schema/peppolstatus-com-id-quality-summary-schema.json",
  "title": "IdQualitySummary",
  "description": "Per-scheme structural ID quality summary, busiest first.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peppolstatus-com-id-quality-api-openapi.yml#/components/schemas/IdQualitySummary",
  "type": "object",
  "required": [
    "schemes",
    "totals",
    "generated_at"
  ],
  "properties": {
    "schemes": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/IdQualitySchemeStat"
      }
    },
    "totals": {
      "type": "object",
      "required": [
        "participants_checked",
        "violations"
      ],
      "properties": {
        "participants_checked": {
          "type": "integer"
        },
        "violations": {
          "type": "integer"
        }
      }
    },
    "generated_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "$defs": {
    "IdQualitySchemeStat": {
      "type": "object",
      "description": "One scheme's structural ID check tally.",
      "required": [
        "scheme",
        "rule",
        "participants_checked",
        "violations",
        "violation_rate"
      ],
      "properties": {
        "scheme": {
          "type": "string",
          "description": "The 4-digit Peppol ICD (e.g. `0208`)."
        },
        "rule": {
          "type": "string",
          "description": "The rule id applied (e.g. `be-enterprise-mod97`)."
        },
        "participants_checked": {
          "type": "integer"
        },
        "violations": {
          "type": "integer"
        },
        "violation_rate": {
          "type": "number",
          "description": "violations / participants_checked, 6 decimals; 0 when none checked."
        }
      }
    }
  }
}