Skip to content

Commit 538013d

Browse files
committed
Clean up
1 parent fcbabd4 commit 538013d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Microsoft Corporation. All rights reserved.
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT license.
33

44
using System;
@@ -52,7 +52,7 @@ public static void ValidateDataTypeMismatch(
5252
return;
5353
}
5454

55-
var type = schema.GetJsonType().Value.GetDisplayName();
55+
var type = schema.GetJsonType()?.GetDisplayName();
5656
var format = schema.GetFormat()?.Key;
5757
var jsonElement = JsonSerializer.Deserialize<JsonElement>(value);
5858

0 commit comments

Comments
 (0)