{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "update_switch_port",
  "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_-]*$"
      }
    },
    "port_id": {
      "type": "string",
      "description": "Port name (e.g. 'ether1') or RouterOS '.id'"
    },
    "default_vlan_id": {
      "description": "PVID: 'auto', 'none', or a VLAN id number",
      "type": "string"
    },
    "vlan_mode": {
      "type": "string",
      "enum": ["disabled", "optional", "enabled", "secure"]
    },
    "vlan_header": {
      "type": "string",
      "enum": ["leave-as-is", "always-strip", "add-if-missing"]
    },
    "force_vlan_id": {
      "type": "boolean"
    }
  },
  "required": ["port_id"],
  "additionalProperties": false
}
