From a10b02ca2c178250aa93cd30855a2422ef35fee4 Mon Sep 17 00:00:00 2001 From: Mateusz Filipowicz Date: Tue, 11 Mar 2025 00:54:44 +0100 Subject: [PATCH] fix: revert allowed empty fields for NTP servers --- codegen/customizations.yml | 4 ---- unifi/setting_ntp.generated.go | 10 +++++----- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/codegen/customizations.yml b/codegen/customizations.yml index 72c9d36..f8d66b2 100644 --- a/codegen/customizations.yml +++ b/codegen/customizations.yml @@ -489,10 +489,6 @@ customizations: fields: _all: omitEmpty: false - SettingNtp: - fields: - _all: - omitEmpty: false SettingRsyslogd: fields: Contents: diff --git a/unifi/setting_ntp.generated.go b/unifi/setting_ntp.generated.go index 3c9ce4a..fcbd430 100644 --- a/unifi/setting_ntp.generated.go +++ b/unifi/setting_ntp.generated.go @@ -29,11 +29,11 @@ type SettingNtp struct { Key string `json:"key"` - NtpServer1 string `json:"ntp_server_1"` - NtpServer2 string `json:"ntp_server_2"` - NtpServer3 string `json:"ntp_server_3"` - NtpServer4 string `json:"ntp_server_4"` - SettingPreference string `json:"setting_preference" validate:"omitempty,oneof=auto manual"` // auto|manual + NtpServer1 string `json:"ntp_server_1,omitempty"` + NtpServer2 string `json:"ntp_server_2,omitempty"` + NtpServer3 string `json:"ntp_server_3,omitempty"` + NtpServer4 string `json:"ntp_server_4,omitempty"` + SettingPreference string `json:"setting_preference,omitempty" validate:"omitempty,oneof=auto manual"` // auto|manual } func (dst *SettingNtp) UnmarshalJSON(b []byte) error {