From 8bc1e2bdef5738ce8af88a9e519fb32e3237f2df Mon Sep 17 00:00:00 2001 From: fifteen-clement Date: Mon, 26 Dec 2022 09:27:22 +0100 Subject: [PATCH] update test inline --- builder/response_test.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/builder/response_test.go b/builder/response_test.go index 864a0d9..a1847dd 100644 --- a/builder/response_test.go +++ b/builder/response_test.go @@ -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) { @@ -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"]) }) }) }