diff --git a/pkg/config/config_struct.go b/pkg/config/config_struct.go index 146a70f56..a75677084 100644 --- a/pkg/config/config_struct.go +++ b/pkg/config/config_struct.go @@ -445,9 +445,6 @@ func (c SkillRegistryConfig) MarshalJSON() ([]byte, error) { "enabled": c.Enabled, "base_url": c.BaseURL, } - if c.Name != "" { - m["name"] = c.Name - } if c.AuthToken.String() != "" { m["auth_token"] = c.AuthToken } @@ -514,9 +511,6 @@ func (c SkillRegistryConfig) MarshalYAML() (any, error) { "enabled": c.Enabled, "base_url": c.BaseURL, } - if c.Name != "" { - m["name"] = c.Name - } if c.AuthToken.String() != "" { m["auth_token"] = c.AuthToken } diff --git a/pkg/config/config_struct_test.go b/pkg/config/config_struct_test.go index e9a7f6661..f02897d28 100644 --- a/pkg/config/config_struct_test.go +++ b/pkg/config/config_struct_test.go @@ -242,6 +242,8 @@ func TestSkillsRegistriesConfigMarshalJSONPreservesObjectShape(t *testing.T) { assert.Contains(t, string(data), `"github":{`) assert.Contains(t, string(data), `"clawhub":{`) assert.NotContains(t, string(data), `[{`) + assert.NotContains(t, string(data), `"name":"github"`) + assert.NotContains(t, string(data), `"name":"clawhub"`) var decoded map[string]json.RawMessage err = json.Unmarshal(data, &decoded)