From 40ac675983e9cc6a80fe24b3c34a39ffdeddabbd Mon Sep 17 00:00:00 2001 From: karencfv Date: Fri, 16 May 2025 13:55:03 +1200 Subject: [PATCH] [api] Set a default empty array for VpcFirewallRuleUpdate --- common/src/api/external/mod.rs | 1 + openapi/nexus.json | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/common/src/api/external/mod.rs b/common/src/api/external/mod.rs index 60325218f1c..a7eef17b2fb 100644 --- a/common/src/api/external/mod.rs +++ b/common/src/api/external/mod.rs @@ -1789,6 +1789,7 @@ pub struct VpcFirewallRuleUpdate { #[derive(Clone, Debug, Deserialize, Serialize, JsonSchema)] pub struct VpcFirewallRuleUpdateParams { #[schemars(length(max = 1024))] + #[serde(default)] pub rules: Vec, } diff --git a/openapi/nexus.json b/openapi/nexus.json index 8066dc14d95..8ba6882ed3b 100644 --- a/openapi/nexus.json +++ b/openapi/nexus.json @@ -25265,16 +25265,14 @@ "type": "object", "properties": { "rules": { + "default": [], "type": "array", "items": { "$ref": "#/components/schemas/VpcFirewallRuleUpdate" }, "maxItems": 1024 } - }, - "required": [ - "rules" - ] + } }, "VpcFirewallRules": { "description": "Collection of a Vpc's firewall rules",