{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "update_wireguard_peer",
  "type": "object",
  "properties": {
    "unset": {
      "description": "Properties to UNSET (RouterOS `!prop`), so they no longer apply — e.g. ['dst-address'] removes the destination-address match. snake_case or kebab-case. Not for setting a value.",
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^[a-z][a-z0-9_-]*$"
      }
    },
    "peer_id": {
      "type": "string",
      "description": "\"*N\" or \"N\" from list output e.g. \"*2\""
    },
    "public_key": {
      "description": "The peer's base64 public key — re-key a peer in place instead of removing and re-adding it (which would lose the rest of its configuration).",
      "type": "string"
    },
    "allowed_address": {
      "type": "string"
    },
    "endpoint_address": {
      "type": "string"
    },
    "endpoint_port": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    },
    "preshared_key": {
      "type": "string"
    },
    "persistent_keepalive": {
      "type": "string"
    },
    "name": {
      "description": "optional peer name label",
      "type": "string"
    },
    "private_key": {
      "description": "peer's private key (lets the router generate this peer's client config)",
      "type": "string"
    },
    "responder": {
      "description": "only respond to handshakes, never initiate",
      "type": "boolean"
    },
    "client_address": {
      "description": "client tunnel address(es) for the generated client config",
      "type": "string"
    },
    "client_dns": {
      "description": "DNS server(s) written into the generated client config",
      "type": "string"
    },
    "client_endpoint": {
      "description": "server endpoint host[:port] written into the generated client config",
      "type": "string"
    },
    "client_keepalive": {
      "description": "client persistent-keepalive for the generated config e.g. \"25s\"",
      "type": "string"
    },
    "client_listen_port": {
      "description": "Client listen port; empty string unsets it on RouterOS 7.25+",
      "anyOf": [
        {
          "type": "integer",
          "minimum": -9007199254740991,
          "maximum": 9007199254740991
        },
        {
          "type": "string",
          "const": ""
        }
      ]
    },
    "client_mtu": {
      "description": "RouterOS 7.25+ MTU in generated client configuration",
      "type": "integer",
      "minimum": 576,
      "maximum": 65535
    },
    "comment": {
      "type": "string"
    },
    "disabled": {
      "type": "boolean"
    }
  },
  "required": ["peer_id"],
  "additionalProperties": false
}
