File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/Microsoft.OpenApi/Models Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -157,10 +157,10 @@ protected override void SetAdditional31MetadataFromMapNode(JsonObject jsonObject
157157
158158 // Extensions (properties starting with "x-")
159159 foreach ( var property in jsonObject
160- . Where ( static p => p . Key . StartsWith ( OpenApiConstants . ExtensionFieldNamePrefix , StringComparison . OrdinalIgnoreCase ) )
161- . Where ( static p => p . Value is JsonNode ) )
160+ . Where ( static p => p . Key . StartsWith ( OpenApiConstants . ExtensionFieldNamePrefix , StringComparison . OrdinalIgnoreCase )
161+ && p . Value is not null ) )
162162 {
163- var extensionValue = ( JsonNode ) property . Value ! ;
163+ var extensionValue = property . Value ! ;
164164 Extensions ??= new Dictionary < string , IOpenApiExtension > ( StringComparer . OrdinalIgnoreCase ) ;
165165 Extensions [ property . Key ] = new JsonNodeExtension ( extensionValue . DeepClone ( ) ) ;
166166 }
You can’t perform that action at this time.
0 commit comments