{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "OpenAgentWorks cloudevent",
  "type": "object",
  "properties": {
    "specversion": {
      "const": "1.0"
    },
    "id": {
      "type": "string",
      "minLength": 1
    },
    "source": {
      "type": "string",
      "format": "uri-reference"
    },
    "type": {
      "const": "example.task.created.v1"
    },
    "time": {
      "type": "string",
      "format": "date-time"
    },
    "datacontenttype": {
      "const": "application/json"
    },
    "data": {
      "type": "object",
      "properties": {
        "task_id": {
          "type": "string",
          "minLength": 1
        },
        "workspace_id": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "task_id",
        "workspace_id"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "specversion",
    "id",
    "source",
    "type",
    "time",
    "datacontenttype",
    "data"
  ],
  "additionalProperties": false
}
