{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.barakahtasks.com/contracts/events/v1/cloud-event.schema.json",
  "title": "Barakah Tasks CloudEvent 1.0",
  "type": "object",
  "required": [
    "specversion",
    "id",
    "source",
    "type",
    "subject",
    "time",
    "datacontenttype",
    "barakahsequence",
    "barakahpublishedat",
    "data"
  ],
  "properties": {
    "specversion": {
      "const": "1.0"
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "source": {
      "const": "https://api.barakahtasks.com/events"
    },
    "type": {
      "type": "string"
    },
    "subject": {
      "type": "string"
    },
    "time": {
      "type": "string",
      "format": "date-time"
    },
    "datacontenttype": {
      "const": "application/json"
    },
    "barakahsequence": {
      "type": "integer",
      "minimum": 1
    },
    "barakahpublishedat": {
      "type": "string",
      "format": "date-time"
    },
    "barakahresourceat": {
      "type": "string",
      "format": "date-time"
    },
    "data": {
      "type": "object"
    }
  },
  "additionalProperties": false
}
