{
  "title": "Webhook Spec",
  "description": "WebhookSpec defines a verified inbound webhook endpoint\n(02-core-extended.md §4).\n",
  "type": "object",
  "properties": {
    "auth": {
      "$ref": "#/$defs/WebhookAuth",
      "nullable": true
    },
    "for": {
      "description": "@schema {example: \"billing.invoice\"}",
      "type": "string",
      "examples": [
        "billing.invoice"
      ]
    },
    "idempotency_key": {
      "$ref": "#/$defs/IdempotencyDecl",
      "nullable": true
    },
    "idempotent": {
      "type": "boolean"
    },
    "method": {
      "description": "@schema {example: \"POST\", enum: [\"GET\", \"POST\", \"PUT\", \"PATCH\", \"DELETE\"]}",
      "type": "string",
      "enum": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "examples": [
        "POST"
      ]
    },
    "path": {
      "description": "@schema {example: \"/webhooks/midtrans\"}",
      "type": "string",
      "examples": [
        "/webhooks/midtrans"
      ]
    }
  },
  "required": [
    "for",
    "method",
    "auth"
  ],
  "additionalProperties": false
}