Skip to content

Commit 64e5b0f

Browse files
authored
Fix JSON casing for catalogRef to match camelCase convention
Fix JSON casing for catalogRef to match camelCase convention
2 parents d0624ca + 41b40bb commit 64e5b0f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/workingset/show_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ func TestShowWithCatalogRef(t *testing.T) {
597597
})
598598
require.NoError(t, err)
599599

600-
t.Run("JSON includes catalog_ref", func(t *testing.T) {
600+
t.Run("JSON includes catalogRef", func(t *testing.T) {
601601
output := captureStdout(func() {
602602
err := Show(ctx, dao, "test-set", OutputFormatJSON, false, "")
603603
require.NoError(t, err)
@@ -611,8 +611,8 @@ func TestShowWithCatalogRef(t *testing.T) {
611611
assert.Equal(t, "docker.io/mcp/docker-mcp-catalog:latest", workingSet.Servers[0].CatalogRef)
612612
assert.Empty(t, workingSet.Servers[1].CatalogRef)
613613

614-
// Verify catalog_ref appears in raw JSON for server with source
615-
assert.Contains(t, output, `"catalog_ref"`)
614+
// Verify catalogRef appears in raw JSON for server with source
615+
assert.Contains(t, output, `"catalogRef"`)
616616
})
617617

618618
t.Run("YAML includes catalog_ref", func(t *testing.T) {

pkg/workingset/workingset.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ type Server struct {
6868

6969
// CatalogRef is the catalog reference that this server was sourced from.
7070
// Empty if the server was added directly (not from a catalog).
71-
CatalogRef string `yaml:"catalog_ref,omitempty" json:"catalog_ref,omitempty"`
71+
CatalogRef string `yaml:"catalog_ref,omitempty" json:"catalogRef,omitempty"`
7272

7373
// Optional snapshot of the server schema
7474
Snapshot *ServerSnapshot `yaml:"snapshot,omitempty" json:"snapshot,omitempty"`

0 commit comments

Comments
 (0)