{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "SocialScrape incidents",
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "id",
      "title",
      "status",
      "impact",
      "platforms",
      "started_at",
      "resolved_at",
      "updates"
    ],
    "properties": {
      "id": {
        "type": "string"
      },
      "title": {
        "type": "string"
      },
      "status": {
        "enum": [
          "investigating",
          "identified",
          "monitoring",
          "resolved"
        ]
      },
      "impact": {
        "enum": [
          "none",
          "minor",
          "major",
          "critical"
        ]
      },
      "platforms": {
        "type": "array",
        "items": {
          "type": "string"
        }
      },
      "started_at": {
        "type": "string",
        "format": "date-time"
      },
      "resolved_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time"
      },
      "updates": {
        "type": "array",
        "items": {
          "type": "object",
          "required": [
            "at",
            "status",
            "body"
          ],
          "properties": {
            "at": {
              "type": "string",
              "format": "date-time"
            },
            "status": {
              "enum": [
                "investigating",
                "identified",
                "monitoring",
                "resolved"
              ]
            },
            "body": {
              "type": "string"
            }
          }
        }
      }
    }
  }
}
