Skip to content

Commit 553921b

Browse files
committed
Add omitempty to MCPGroupStatus JSON fields
Add omitempty to servers and serverCount JSON tags in MCPGroupStatus so optional fields are omitted from serialized output when empty, consistent with other optional fields in the struct. Fixes #4537 Signed-off-by: Sharan Raj T <sharanrajtm@gmail.com>
1 parent 9057f7a commit 553921b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/thv-operator/api/v1beta1/mcpgroup_types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ type MCPGroupStatus struct {
2828
// Servers lists MCPServer names in this group
2929
// +listType=set
3030
// +optional
31-
Servers []string `json:"servers"`
31+
Servers []string `json:"servers,omitempty"`
3232

3333
// ServerCount is the number of MCPServers
3434
// +optional
35-
ServerCount int32 `json:"serverCount"`
35+
ServerCount int32 `json:"serverCount,omitempty"`
3636

3737
// RemoteProxies lists MCPRemoteProxy names in this group
3838
// +listType=set

0 commit comments

Comments
 (0)