We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8037531 commit 7b33c1dCopy full SHA for 7b33c1d
src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs
@@ -58,12 +58,9 @@ public static void ValidateDataTypeMismatch(
58
59
// Before checking the type, check first if the schema allows null.
60
// If so and the data given is also null, this is allowed for any type.
61
- if (nullable)
+ if (nullable && jsonElement.ValueKind is JsonValueKind.Null)
62
{
63
- if (jsonElement.ValueKind is JsonValueKind.Null)
64
- {
65
- return;
66
- }
+ return;
67
}
68
69
if (type == "object")
0 commit comments