Skip to content

Commit cba3dda

Browse files
committed
chore: linting
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
1 parent 88cbeaa commit cba3dda

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Microsoft.OpenApi/Models/JsonSchemaReference.cs

Lines changed: 4 additions & 4 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;
@@ -156,10 +156,10 @@ protected override void SetAdditional31MetadataFromMapNode(JsonObject jsonObject
156156
}
157157

158158
// Extensions (properties starting with "x-")
159-
foreach (var property in jsonObject)
159+
foreach (var property in jsonObject
160+
.Where(static p => p.Key.StartsWith(OpenApiConstants.ExtensionFieldNamePrefix, StringComparison.OrdinalIgnoreCase)))
160161
{
161-
if (property.Key.StartsWith(OpenApiConstants.ExtensionFieldNamePrefix, StringComparison.OrdinalIgnoreCase)
162-
&& property.Value is JsonNode extensionValue)
162+
if (property.Value is JsonNode extensionValue)
163163
{
164164
Extensions ??= new Dictionary<string, IOpenApiExtension>(StringComparer.OrdinalIgnoreCase);
165165
Extensions[property.Key] = new JsonNodeExtension(extensionValue.DeepClone());

0 commit comments

Comments
 (0)