@@ -14,22 +14,22 @@ public class OpenApiTypeMapperTests
14
14
{
15
15
public static IEnumerable < object [ ] > PrimitiveTypeData => new List < object [ ] >
16
16
{
17
- new object [ ] { typeof ( int ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int32" } } ,
17
+ new object [ ] { typeof ( int ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int32" } } ,
18
18
new object [ ] { typeof ( decimal ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "double" } } ,
19
19
new object [ ] { typeof ( decimal ? ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "double" , Nullable = true } } ,
20
20
new object [ ] { typeof ( bool ? ) , new OpenApiSchema { Type = JsonSchemaType . Boolean , Nullable = true } } ,
21
21
new object [ ] { typeof ( Guid ) , new OpenApiSchema { Type = JsonSchemaType . String , Format = "uuid" } } ,
22
22
new object [ ] { typeof ( Guid ? ) , new OpenApiSchema { Type = JsonSchemaType . String , Format = "uuid" , Nullable = true } } ,
23
- new object [ ] { typeof ( uint ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int32" } } ,
24
- new object [ ] { typeof ( long ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int64" } } ,
25
- new object [ ] { typeof ( long ? ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int64" , Nullable = true } } ,
26
- new object [ ] { typeof ( ulong ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int64" } } ,
23
+ new object [ ] { typeof ( uint ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int32" } } ,
24
+ new object [ ] { typeof ( long ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int64" } } ,
25
+ new object [ ] { typeof ( long ? ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int64" , Nullable = true } } ,
26
+ new object [ ] { typeof ( ulong ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int64" } } ,
27
27
new object [ ] { typeof ( string ) , new OpenApiSchema { Type = JsonSchemaType . String } } ,
28
28
new object [ ] { typeof ( double ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "double" } } ,
29
29
new object [ ] { typeof ( float ? ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "float" , Nullable = true } } ,
30
30
new object [ ] { typeof ( byte ? ) , new OpenApiSchema { Type = JsonSchemaType . String , Format = "byte" , Nullable = true } } ,
31
- new object [ ] { typeof ( int ? ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int32" , Nullable = true } } ,
32
- new object [ ] { typeof ( uint ? ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int32" , Nullable = true } } ,
31
+ new object [ ] { typeof ( int ? ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int32" , Nullable = true } } ,
32
+ new object [ ] { typeof ( uint ? ) , new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int32" , Nullable = true } } ,
33
33
new object [ ] { typeof ( DateTimeOffset ? ) , new OpenApiSchema { Type = JsonSchemaType . String , Format = "date-time" , Nullable = true } } ,
34
34
new object [ ] { typeof ( double ? ) , new OpenApiSchema { Type = JsonSchemaType . Number , Format = "double" , Nullable = true } } ,
35
35
new object [ ] { typeof ( char ? ) , new OpenApiSchema { Type = JsonSchemaType . String , Nullable = true } } ,
@@ -38,10 +38,10 @@ public class OpenApiTypeMapperTests
38
38
39
39
public static IEnumerable < object [ ] > OpenApiDataTypes => new List < object [ ] >
40
40
{
41
- new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int32" , Nullable = false } , typeof ( int ) } ,
42
- new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int32" , Nullable = true } , typeof ( int ? ) } ,
43
- new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int64" , Nullable = false } , typeof ( long ) } ,
44
- new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Number , Format = "int64" , Nullable = true } , typeof ( long ? ) } ,
41
+ new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int32" , Nullable = false } , typeof ( int ) } ,
42
+ new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int32" , Nullable = true } , typeof ( int ? ) } ,
43
+ new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int64" , Nullable = false } , typeof ( long ) } ,
44
+ new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Integer , Format = "int64" , Nullable = true } , typeof ( long ? ) } ,
45
45
new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Number , Format = "decimal" } , typeof ( decimal ) } ,
46
46
new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Integer , Format = null , Nullable = false } , typeof ( long ) } ,
47
47
new object [ ] { new OpenApiSchema { Type = JsonSchemaType . Integer , Format = null , Nullable = true } , typeof ( long ? ) } ,
0 commit comments