@@ -175,7 +175,7 @@ func TestDecodeParameter(t *testing.T) {
175175 name : "integer" ,
176176 param : & openapi3.Parameter {Name : "param" , In : "path" , Schema : integerSchema },
177177 path : "/1" ,
178- want : float64 (1 ),
178+ want : int64 (1 ),
179179 found : true ,
180180 },
181181 {
@@ -456,7 +456,7 @@ func TestDecodeParameter(t *testing.T) {
456456 name : "integer" ,
457457 param : & openapi3.Parameter {Name : "param" , In : "query" , Schema : integerSchema },
458458 query : "param=1" ,
459- want : float64 (1 ),
459+ want : int64 (1 ),
460460 found : true ,
461461 },
462462 {
@@ -522,7 +522,7 @@ func TestDecodeParameter(t *testing.T) {
522522 name : "anyofSchema integer" ,
523523 param : & openapi3.Parameter {Name : "param" , In : "query" , Schema : anyofSchema },
524524 query : "param=1" ,
525- want : float64 (1 ),
525+ want : int64 (1 ),
526526 found : true ,
527527 },
528528 {
@@ -548,7 +548,7 @@ func TestDecodeParameter(t *testing.T) {
548548 name : "oneofSchema int" ,
549549 param : & openapi3.Parameter {Name : "param" , In : "query" , Schema : oneofSchema },
550550 query : "param=1122" ,
551- want : float64 (1122 ),
551+ want : int64 (1122 ),
552552 found : true ,
553553 },
554554 {
@@ -724,7 +724,7 @@ func TestDecodeParameter(t *testing.T) {
724724 name : "integer" ,
725725 param : & openapi3.Parameter {Name : "X-Param" , In : "header" , Schema : integerSchema },
726726 header : "X-Param:1" ,
727- want : float64 (1 ),
727+ want : int64 (1 ),
728728 found : true ,
729729 },
730730 {
@@ -835,6 +835,13 @@ func TestDecodeParameter(t *testing.T) {
835835 want : map [string ]interface {}{"id" : "foo" , "name" : "bar" },
836836 found : true ,
837837 },
838+ {
839+ name : "valid integer prop" ,
840+ param : & openapi3.Parameter {Name : "X-Param" , In : "header" , Schema : integerSchema },
841+ header : "X-Param:88" ,
842+ found : true ,
843+ want : int64 (88 ),
844+ },
838845 {
839846 name : "invalid integer prop" ,
840847 param : & openapi3.Parameter {Name : "X-Param" , In : "header" , Schema : objectOf ("foo" , integerSchema )},
@@ -893,7 +900,7 @@ func TestDecodeParameter(t *testing.T) {
893900 name : "integer" ,
894901 param : & openapi3.Parameter {Name : "X-Param" , In : "cookie" , Schema : integerSchema },
895902 cookie : "X-Param:1" ,
896- want : float64 (1 ),
903+ want : int64 (1 ),
897904 found : true ,
898905 },
899906 {
@@ -1180,7 +1187,7 @@ func TestDecodeBody(t *testing.T) {
11801187 WithProperty ("a" , openapi3 .NewStringSchema ()).
11811188 WithProperty ("b" , openapi3 .NewIntegerSchema ()).
11821189 WithProperty ("c" , openapi3 .NewArraySchema ().WithItems (openapi3 .NewStringSchema ())),
1183- want : map [string ]interface {}{"a" : "a1" , "b" : float64 (10 ), "c" : []interface {}{"c1" , "c2" }},
1190+ want : map [string ]interface {}{"a" : "a1" , "b" : int64 (10 ), "c" : []interface {}{"c1" , "c2" }},
11841191 },
11851192 {
11861193 name : "urlencoded space delimited" ,
@@ -1193,7 +1200,7 @@ func TestDecodeBody(t *testing.T) {
11931200 encoding : map [string ]* openapi3.Encoding {
11941201 "c" : {Style : openapi3 .SerializationSpaceDelimited , Explode : boolPtr (false )},
11951202 },
1196- want : map [string ]interface {}{"a" : "a1" , "b" : float64 (10 ), "c" : []interface {}{"c1" , "c2" }},
1203+ want : map [string ]interface {}{"a" : "a1" , "b" : int64 (10 ), "c" : []interface {}{"c1" , "c2" }},
11971204 },
11981205 {
11991206 name : "urlencoded pipe delimited" ,
@@ -1206,7 +1213,7 @@ func TestDecodeBody(t *testing.T) {
12061213 encoding : map [string ]* openapi3.Encoding {
12071214 "c" : {Style : openapi3 .SerializationPipeDelimited , Explode : boolPtr (false )},
12081215 },
1209- want : map [string ]interface {}{"a" : "a1" , "b" : float64 (10 ), "c" : []interface {}{"c1" , "c2" }},
1216+ want : map [string ]interface {}{"a" : "a1" , "b" : int64 (10 ), "c" : []interface {}{"c1" , "c2" }},
12101217 },
12111218 {
12121219 name : "multipart" ,
0 commit comments