Skip to content

Commit

Permalink
update test inline
Browse files Browse the repository at this point in the history
  • Loading branch information
fifteen-clement authored and schmurfy committed Dec 26, 2022
1 parent 102e77f commit 8bc1e2b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions builder/response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ import (
type Parent struct {
Inline
Field3 string
Field4 int
Field4 int `json:"field4"`
}

type Inline struct {
Field1 string
Field2 int
Field2 int `json:"field2"`
}

func TestResponse(t *testing.T) {
Expand Down Expand Up @@ -151,6 +151,9 @@ func TestResponse(t *testing.T) {
require.NotNil(g, b.swagger.Components.Schemas[reflect.TypeOf(req.Response).String()])
require.Len(g, b.swagger.Components.Schemas[reflect.TypeOf(req.Response).String()].Value.Properties, 4)
require.NotNil(g, b.swagger.Components.Schemas[reflect.TypeOf(req.Response).String()].Value.Properties["Field1"])
require.NotNil(g, b.swagger.Components.Schemas[reflect.TypeOf(req.Response).String()].Value.Properties["field2"])
require.NotNil(g, b.swagger.Components.Schemas[reflect.TypeOf(req.Response).String()].Value.Properties["Field3"])
require.NotNil(g, b.swagger.Components.Schemas[reflect.TypeOf(req.Response).String()].Value.Properties["field4"])
})
})
}

0 comments on commit 8bc1e2b

Please sign in to comment.