Skip to content

Commit

Permalink
Update type and format to lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Dec 6, 2022
1 parent dca3151 commit 2ad17ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Extensions/OpenApiTypeMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public static Type MapOpenApiPrimitiveTypeToSimpleType(this OpenApiSchema schema
throw new ArgumentNullException(nameof(schema));
}

var type = (schema.Type, schema.Format, schema.Nullable) switch
var type = (schema.Type?.ToLowerInvariant(), schema.Format.ToLowerInvariant(), schema.Nullable) switch
{
("boolean", null, false) => typeof(bool),
("integer", "int32", false) => typeof(int),
Expand Down

0 comments on commit 2ad17ba

Please sign in to comment.