@@ -974,6 +974,7 @@ func TestDecodeBody(t *testing.T) {
974
974
{name : "c" , contentType : "text/plain" , data : strings .NewReader ("c2" )},
975
975
{name : "d" , contentType : "application/json" , data : bytes .NewReader (d )},
976
976
{name : "f" , contentType : "application/octet-stream" , data : strings .NewReader ("foo" ), filename : "f1" },
977
+ {name : "g" , data : strings .NewReader ("g1" )},
977
978
})
978
979
require .NoError (t , err )
979
980
@@ -987,10 +988,14 @@ func TestDecodeBody(t *testing.T) {
987
988
{name : "a" , contentType : "text/plain" , data : strings .NewReader ("a1" )},
988
989
{name : "x" , contentType : "text/plain" , data : strings .NewReader ("x1" )},
989
990
})
991
+ require .NoError (t , err )
992
+
990
993
multipartAdditionalProps , multipartMimeAdditionalProps , err := newTestMultipartForm ([]* testFormPart {
991
994
{name : "a" , contentType : "text/plain" , data : strings .NewReader ("a1" )},
992
995
{name : "x" , contentType : "text/plain" , data : strings .NewReader ("x1" )},
993
996
})
997
+ require .NoError (t , err )
998
+
994
999
multipartAdditionalPropsErr , multipartMimeAdditionalPropsErr , err := newTestMultipartForm ([]* testFormPart {
995
1000
{name : "a" , contentType : "text/plain" , data : strings .NewReader ("a1" )},
996
1001
{name : "x" , contentType : "text/plain" , data : strings .NewReader ("x1" )},
@@ -1075,8 +1080,9 @@ func TestDecodeBody(t *testing.T) {
1075
1080
WithProperty ("b" , openapi3 .NewIntegerSchema ()).
1076
1081
WithProperty ("c" , openapi3 .NewArraySchema ().WithItems (openapi3 .NewStringSchema ())).
1077
1082
WithProperty ("d" , openapi3 .NewObjectSchema ().WithProperty ("d1" , openapi3 .NewStringSchema ())).
1078
- WithProperty ("f" , openapi3 .NewStringSchema ().WithFormat ("binary" )),
1079
- want : map [string ]interface {}{"a" : "a1" , "b" : float64 (10 ), "c" : []interface {}{"c1" , "c2" }, "d" : map [string ]interface {}{"d1" : "d1" }, "f" : "foo" },
1083
+ WithProperty ("f" , openapi3 .NewStringSchema ().WithFormat ("binary" )).
1084
+ WithProperty ("g" , openapi3 .NewStringSchema ()),
1085
+ want : map [string ]interface {}{"a" : "a1" , "b" : float64 (10 ), "c" : []interface {}{"c1" , "c2" }, "d" : map [string ]interface {}{"d1" : "d1" }, "f" : "foo" , "g" : "g1" },
1080
1086
},
1081
1087
{
1082
1088
name : "multipartExtraPart" ,
0 commit comments