some cleanup

This commit is contained in:
Shreyas Goenka 2023-01-13 19:26:50 +01:00
parent 0f67d7c0d7
commit 1538422d27
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
2 changed files with 2 additions and 12 deletions

View File

@ -119,16 +119,6 @@ func safeToProperty(golangType reflect.Type, traceSet map[reflect.Type]struct{},
return props, nil 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 // travels anonymous embedded fields in a bfs manner to give us a list of all
// member fields of a struct // member fields of a struct
// simple Tree based traversal will take place because embbedded fields cannot // simple Tree based traversal will take place because embbedded fields cannot

View File

@ -266,7 +266,7 @@ func TestMapOfObjectsSchema(t *testing.T) {
assert.Equal(t, expected, string(jsonSchema)) assert.Equal(t, expected, string(jsonSchema))
} }
func TestEmbeddedSchema(t *testing.T) { func TestEmbeddedStructSchema(t *testing.T) {
type Person struct { type Person struct {
Name string `json:"name"` Name string `json:"name"`
Age int `json:"age,omitempty"` Age int `json:"age,omitempty"`