diff --git a/schemas/cluster.json b/schemas/cluster.json index 04a6139..204a3c2 100644 --- a/schemas/cluster.json +++ b/schemas/cluster.json @@ -140,12 +140,11 @@ "array", "null" ], + "default": null, "items": { "type": "string", "format": "ipv4" - }, - "maxItems": 2, - "minItems": 2 + } }, "gateway": { "type": [ diff --git a/schemas/node.json b/schemas/node.json index de7cc98..e13f4da 100644 --- a/schemas/node.json +++ b/schemas/node.json @@ -136,12 +136,11 @@ "array", "null" ], + "default": null, "items": { "type": "string", "format": "ipv4" - }, - "maxItems": 2, - "minItems": 2 + } }, "gateway": { "type": [ diff --git a/src/node.rs b/src/node.rs index 314ce14..ab5c166 100644 --- a/src/node.rs +++ b/src/node.rs @@ -53,7 +53,8 @@ struct Network { ip: Ipv4Addr, netmask: Ipv4Addr, gateway: Ipv4Addr, - dns: [Ipv4Addr; 2], + #[serde(default)] + dns: Option>, #[optional_rename(OptionalTailscale)] #[optional_wrap] tailscale: Tailscale,