Skip to content

Commit b2e1026

Browse files
committed
code cleanup
1 parent 314880d commit b2e1026

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.OpenApi/Models/OpenApiSchema.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -839,7 +839,7 @@ private static int CountEnumSetFlags(JsonSchemaType? schemaType)
839839
{
840840
int count = 0;
841841

842-
if(schemaType != null)
842+
if (schemaType != null)
843843
{
844844
// Check each flag in the enum
845845
foreach (JsonSchemaType value in System.Enum.GetValues(typeof(JsonSchemaType)))
@@ -895,7 +895,7 @@ private void DowncastTypeArrayToV2OrV3(JsonSchemaType? schemaType, IOpenApiWrite
895895
writer.WriteProperty(OpenApiConstants.Type, OpenApiTypeMapper.ToIdentifier(schemaType));
896896
}
897897
}
898-
else if (flagsCount is 2 && (schemaType & JsonSchemaType.Null) == JsonSchemaType.Null)
898+
else if (flagsCount is 2 && (schemaType & JsonSchemaType.Null) == JsonSchemaType.Null) // checks for two values and one is null
899899
{
900900
foreach (JsonSchemaType flag in System.Enum.GetValues(typeof(JsonSchemaType)))
901901
{

0 commit comments

Comments
 (0)