From a9111017f6617939c1593fa166ef57178d9fddbe Mon Sep 17 00:00:00 2001 From: Matthew Kent Date: Thu, 28 May 2026 13:43:46 -0700 Subject: [PATCH] Allow clearing all records on an internal data group The Records field on dataGroupDTO was tagged `json:"records,omitempty"`, so a PUT with an empty record set sent no `records` field at all and BigIP kept the existing entries. Drop omitempty so callers can clear records by passing an empty slice (which now serializes as `"records": []`). Mirrors the vendor patch in F5Networks/terraform-provider-bigip#1165. --- ltm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltm.go b/ltm.go index f8750eb..950e4cf 100644 --- a/ltm.go +++ b/ltm.go @@ -222,7 +222,7 @@ type dataGroupDTO struct { FullPath string `json:"fullPath,omitempty"` Generation int `json:"generation,omitempty"` Type string `json:"type,omitempty"` - Records []DataGroupRecord `json:"records,omitempty"` + Records []DataGroupRecord `json:"records"` } func (p *DataGroup) MarshalJSON() ([]byte, error) {