{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/peppolstatus-com/json-schema/peppolstatus-com-anomaly-page-schema.json",
  "title": "AnomalyPage",
  "description": "A page of anomalies.",
  "x-generated": "2026-11-21",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/peppolstatus-com-anomalies-api-openapi.yml#/components/schemas/AnomalyPage",
  "type": "object",
  "required": [
    "items",
    "next_cursor"
  ],
  "properties": {
    "items": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AnomalyView"
      }
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque cursor for the next page, or null on the last page."
    }
  },
  "$defs": {
    "AnomalyView": {
      "type": "object",
      "required": [
        "id",
        "detector",
        "grade",
        "target",
        "event_refs",
        "evidence",
        "observed_at",
        "acknowledged",
        "reason"
      ],
      "properties": {
        "id": {
          "type": "string"
        },
        "detector": {
          "type": "string",
          "enum": [
            "cert_identity_shift",
            "off_cadence_rotation",
            "endpoint_off_footprint",
            "moved_to_unverified_seat",
            "mass_change_burst",
            "split_id_registration",
            "host_tls_cert_expired",
            "host_tls_cert_expiring"
          ]
        },
        "grade": {
          "type": "string",
          "enum": [
            "notice",
            "warning",
            "info"
          ]
        },
        "target": {
          "type": "object",
          "additionalProperties": true
        },
        "event_refs": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "evidence": {
          "type": "object",
          "additionalProperties": true
        },
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "acknowledged": {
          "type": "boolean"
        },
        "reason": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    }
  }
}