Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet authored Oct 2, 2023
1 parent e2e3f64 commit 0252298
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public static IOpenApiAny GetSpecificOpenApiAny(IOpenApiAny openApiAny, OpenApiS
return newObject;
}

if (!(openApiAny is OpenApiString apiString))
if (openApiAny is not OpenApiString apiString)
{
return openApiAny;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.OpenApi/Validations/Rules/RuleHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void ValidateDataTypeMismatch(
}

// If value is not a string and also not an object, there is a data mismatch.
if (!(value is OpenApiObject anyObject))
if (value is not OpenApiObject anyObject)
{
context.CreateWarning(
ruleName,
Expand Down Expand Up @@ -113,7 +113,7 @@ public static void ValidateDataTypeMismatch(
}

// If value is not a string and also not an array, there is a data mismatch.
if (!(value is OpenApiArray anyArray))
if (value is not OpenApiArray anyArray)
{
context.CreateWarning(
ruleName,
Expand Down

0 comments on commit 0252298

Please sign in to comment.