Skip to content

Commit 0b4110a

Browse files
committed
Fix failing tests
1 parent 2ad17ba commit 0b4110a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static Type MapOpenApiPrimitiveTypeToSimpleType(this OpenApiSchema schema
9595
throw new ArgumentNullException(nameof(schema));
9696
}
9797

98-
var type = (schema.Type?.ToLowerInvariant(), schema.Format.ToLowerInvariant(), schema.Nullable) switch
98+
var type = (schema.Type?.ToLowerInvariant(), schema.Format?.ToLowerInvariant(), schema.Nullable) switch
9999
{
100100
("boolean", null, false) => typeof(bool),
101101
("integer", "int32", false) => typeof(int),

test/Microsoft.OpenApi.Tests/PublicApi/PublicApi.approved.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ namespace Microsoft.OpenApi.Extensions
284284
}
285285
public static class OpenApiTypeMapper
286286
{
287+
public static System.Type MapOpenApiPrimitiveTypeToSimpleType(this Microsoft.OpenApi.Models.OpenApiSchema schema) { }
287288
public static Microsoft.OpenApi.Models.OpenApiSchema MapTypeToOpenApiPrimitiveType(this System.Type type) { }
288289
}
289290
public static class StringExtensions

0 commit comments

Comments
 (0)