{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema_version",
    "ticket_id",
    "source",
    "repository",
    "issue_node_id",
    "title",
    "body",
    "labels",
    "url",
    "updated_at"
  ],
  "properties": {
    "schema_version": { "const": 1 },
    "ticket_id": {
      "type": "string",
      "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$"
    },
    "source": { "type": "string", "enum": ["github", "local"] },
    "repository": { "type": ["string", "null"], "minLength": 3, "maxLength": 201 },
    "issue_node_id": { "type": ["string", "null"], "minLength": 1, "maxLength": 512 },
    "title": { "type": "string", "minLength": 1, "maxLength": 1024 },
    "body": { "type": ["string", "null"], "maxLength": 1048576 },
    "labels": {
      "type": "array",
      "maxItems": 100,
      "items": { "type": "string", "minLength": 1, "maxLength": 100 }
    },
    "url": { "type": ["string", "null"], "minLength": 1, "maxLength": 4096 },
    "updated_at": {
      "type": "string",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(?:\\.[0-9]{1,3})?Z$"
    }
  }
}
