{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://m365tracker.cloudidentity.se/api/v1/schema/item.schema.json",
  "title": "M365 Change Tracker item",
  "type": "object",
  "required": [
    "id",
    "source",
    "kind",
    "title",
    "link"
  ],
  "properties": {
    "id": {
      "type": "string",
      "description": "stable id, e.g. rm-123456 / cve-CVE-2026-1234 / gr-<hash>"
    },
    "source": {
      "enum": [
        "roadmap",
        "msrc",
        "defender-xdr",
        "entra",
        "graph"
      ]
    },
    "kind": {
      "enum": [
        "feature",
        "security",
        "defender",
        "entra",
        "api-change"
      ]
    },
    "title": {
      "type": "string"
    },
    "description": {
      "type": "string"
    },
    "link": {
      "type": "string",
      "format": "uri"
    },
    "products": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "categories": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "facets incl. retiring/breaking/deprecation/preview/on-prem/default-on/licensing/…"
    },
    "status": {
      "type": "string"
    },
    "impact": {
      "enum": [
        "high",
        "medium",
        "low"
      ]
    },
    "impactReason": {
      "type": "string",
      "description": "derived"
    },
    "urgency": {
      "enum": [
        "Immediate",
        "Soon",
        "Monitor",
        ""
      ]
    },
    "adminAction": {
      "type": "string",
      "description": "verbatim source action sentence"
    },
    "applies": {
      "enum": [
        "cloud",
        "on-prem",
        "hybrid",
        ""
      ],
      "description": "derived"
    },
    "deadline": {
      "$ref": "#/$defs/deadline"
    },
    "classifications": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/classification"
      }
    },
    "cve": {
      "type": "string"
    },
    "severity": {
      "type": "string"
    },
    "cvss": {
      "type": "number"
    },
    "epss": {
      "type": "number"
    },
    "exploited": {
      "type": "boolean"
    },
    "kev": {
      "type": "boolean"
    },
    "kevDueDate": {
      "type": "string"
    },
    "gaTarget": {
      "type": "string"
    },
    "targetDate": {
      "type": "string"
    },
    "cloudInstances": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "apiSummary": {
      "type": [
        "object",
        "null"
      ],
      "description": "Graph: {counts,names} by verb"
    },
    "volatility": {
      "type": [
        "object",
        "null"
      ],
      "description": "{edits,slips,statusCh} from history"
    },
    "created": {
      "type": [
        "string",
        "null"
      ]
    },
    "modified": {
      "type": [
        "string",
        "null"
      ]
    }
  },
  "$defs": {
    "deadline": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "type": {
          "type": "string"
        },
        "date": {
          "type": [
            "string",
            "null"
          ]
        },
        "precision": {
          "type": "string"
        },
        "source": {
          "type": "string"
        },
        "action": {
          "type": "string"
        },
        "obligation": {
          "type": "boolean"
        },
        "label": {
          "type": "string"
        }
      }
    },
    "classification": {
      "type": "object",
      "properties": {
        "type": {
          "enum": [
            "retiring",
            "breaking",
            "deprecation"
          ]
        },
        "confidence": {
          "type": "number"
        },
        "evidence": {
          "type": "object",
          "properties": {
            "text": {
              "type": "string"
            },
            "rule": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}