diff --git a/bundle/schema/schema.go b/bundle/schema/schema.go index dac7125a..9ad03d83 100644 --- a/bundle/schema/schema.go +++ b/bundle/schema/schema.go @@ -119,16 +119,6 @@ func safeToProperty(golangType reflect.Type, traceSet map[reflect.Type]struct{}, return props, nil } -func pop(q []reflect.StructField) reflect.StructField { - elem := q[0] - q = q[1:] - return elem -} - -func push(q []reflect.StructField, r reflect.StructField) { - q = append(q, r) -} - // travels anonymous embedded fields in a bfs manner to give us a list of all // member fields of a struct // simple Tree based traversal will take place because embbedded fields cannot diff --git a/bundle/schema/schema_test.go b/bundle/schema/schema_test.go index 93e6a8f6..f22f0867 100644 --- a/bundle/schema/schema_test.go +++ b/bundle/schema/schema_test.go @@ -266,7 +266,7 @@ func TestMapOfObjectsSchema(t *testing.T) { assert.Equal(t, expected, string(jsonSchema)) } -func TestEmbeddedSchema(t *testing.T) { +func TestEmbeddedStructSchema(t *testing.T) { type Person struct { Name string `json:"name"` Age int `json:"age,omitempty"` @@ -274,7 +274,7 @@ func TestEmbeddedSchema(t *testing.T) { type Location struct { Country string `json:"country"` - State string `json:"state,omitempty"` + State string `json:"state,omitempty"` } type Plot struct {