{
  "$id": "https://r3ply.com/schemas/v0.0.1/config/moderation/webhook.v0.0.1.json",
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Webhook moderation",
  "description": "Specifies how comments should be sent to a webhook.",
  "$comment": "Note: webhook moderation is useful taking custom actions.",
  "type": "object",
  "required": [
    "url"
  ],
  "unevaluatedProperties": false,
  "allOf": [
    {
      "$ref": "https://r3ply.com/schemas/v0.0.1/config/moderation.v0.0.1.json#/definitions/options"
    }
  ],
  "properties": {
    "type": {
      "const": "webhook"
    },
    "url": {
      "title": "Webhook URL",
      "description": "The comment will be in the request body.",
      "type": "string",
      "format": "uri",
      "$comment": "TODO: when r3ply supports secrets allow secrets to be stored here."
    },
    "method": {
      "title": "Webhook method",
      "description": "The method the comment will be sent with.",
      "type": "string",
      "enum": [
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "default": "POST"
    }
  }
}