From 48a809e987a1331263d460d711e4f7955281892f Mon Sep 17 00:00:00 2001 From: Roman Kolesnikov Date: Fri, 9 Dec 2022 17:06:07 +0100 Subject: [PATCH] check Extensions object for null using Microsoft.OpenApi.OData package it generates OpenApi document with OpenApiComponents.Extensions == null --- src/Microsoft.OpenApi/Services/OpenApiWalker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs index 78ca5e61b..8c469261c 100644 --- a/src/Microsoft.OpenApi/Services/OpenApiWalker.cs +++ b/src/Microsoft.OpenApi/Services/OpenApiWalker.cs @@ -274,7 +274,7 @@ internal void Walk(IOpenApiExtensible openApiExtensible) _visitor.Visit(openApiExtensible); - if (openApiExtensible != null) + if (openApiExtensible.Extensions != null) { foreach (var item in openApiExtensible.Extensions) {