From 98885a12a32ce11f61011c941fe64eaadcf74b5c Mon Sep 17 00:00:00 2001 From: Mateusz Filipowicz Date: Fri, 14 Mar 2025 12:27:01 +0100 Subject: [PATCH] fix: allow empty fields in SettingMgmt (#50) --- codegen/customizations.yml | 6 ++++++ unifi/setting_mgmt.generated.go | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/codegen/customizations.yml b/codegen/customizations.yml index f8d66b2..6465f1b 100644 --- a/codegen/customizations.yml +++ b/codegen/customizations.yml @@ -489,6 +489,12 @@ customizations: fields: _all: omitEmpty: false + SettingMgmt: + fields: + AutoUpgradeHour: + omitEmpty: false + XSshKeys: + omitEmpty: false SettingRsyslogd: fields: Contents: diff --git a/unifi/setting_mgmt.generated.go b/unifi/setting_mgmt.generated.go index 0da4092..41a23d0 100644 --- a/unifi/setting_mgmt.generated.go +++ b/unifi/setting_mgmt.generated.go @@ -32,7 +32,7 @@ type SettingMgmt struct { AdvancedFeatureEnabled bool `json:"advanced_feature_enabled"` AlertEnabled bool `json:"alert_enabled"` AutoUpgrade bool `json:"auto_upgrade"` - AutoUpgradeHour int `json:"auto_upgrade_hour,omitempty"` // [0-9]|1[0-9]|2[0-3]|^$ + AutoUpgradeHour int `json:"auto_upgrade_hour"` // [0-9]|1[0-9]|2[0-3]|^$ BootSound bool `json:"boot_sound"` DebugToolsEnabled bool `json:"debug_tools_enabled"` DirectConnectEnabled bool `json:"direct_connect_enabled"` @@ -44,7 +44,7 @@ type SettingMgmt struct { XSshAuthPasswordEnabled bool `json:"x_ssh_auth_password_enabled"` XSshBindWildcard bool `json:"x_ssh_bind_wildcard"` XSshEnabled bool `json:"x_ssh_enabled"` - XSshKeys []SettingMgmtXSshKeys `json:"x_ssh_keys,omitempty"` + XSshKeys []SettingMgmtXSshKeys `json:"x_ssh_keys"` XSshMd5Passwd string `json:"x_ssh_md5passwd,omitempty"` XSshPassword string `json:"x_ssh_password,omitempty" validate:"omitempty,gte=1,lte=128"` // .{1,128} XSshSha512Passwd string `json:"x_ssh_sha512passwd,omitempty"`