From f7e4a2d545115b61c4f6f28e80c154816cf8a4a9 Mon Sep 17 00:00:00 2001 From: Dreaded_X Date: Fri, 17 Apr 2026 21:32:19 +0200 Subject: [PATCH] feat: Make dns optional --- schemas/cluster.json | 1 + schemas/node.json | 1 + src/node.rs | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/schemas/cluster.json b/schemas/cluster.json index 43ee75d..204a3c2 100644 --- a/schemas/cluster.json +++ b/schemas/cluster.json @@ -140,6 +140,7 @@ "array", "null" ], + "default": null, "items": { "type": "string", "format": "ipv4" diff --git a/schemas/node.json b/schemas/node.json index 3cda037..e13f4da 100644 --- a/schemas/node.json +++ b/schemas/node.json @@ -136,6 +136,7 @@ "array", "null" ], + "default": null, "items": { "type": "string", "format": "ipv4" diff --git a/src/node.rs b/src/node.rs index 5dbce8c..ab5c166 100644 --- a/src/node.rs +++ b/src/node.rs @@ -53,7 +53,8 @@ struct Network { ip: Ipv4Addr, netmask: Ipv4Addr, gateway: Ipv4Addr, - dns: Vec, + #[serde(default)] + dns: Option>, #[optional_rename(OptionalTailscale)] #[optional_wrap] tailscale: Tailscale,