From 6061f77baf598b40d7f24f24983c3280c024dd82 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Mon, 3 Jun 2024 16:38:20 +0300 Subject: [PATCH] ensure version is present --- src/Kiota.Builder/Plugins/PluginsGenerationService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kiota.Builder/Plugins/PluginsGenerationService.cs b/src/Kiota.Builder/Plugins/PluginsGenerationService.cs index 7fe5c0476b..a51b2e4f9c 100644 --- a/src/Kiota.Builder/Plugins/PluginsGenerationService.cs +++ b/src/Kiota.Builder/Plugins/PluginsGenerationService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; @@ -103,8 +103,8 @@ private OpenApiDocument GetDocumentWithTrimmedComponentsAndResponses(OpenApiDocu doc.Components ??= new OpenApiComponents(); if (string.IsNullOrEmpty(doc.Info?.Version)) // filtering fails if there's no version. - return doc; - + doc.Info!.Version = "1.0"; + //empty out all the responses with a single empty 2XX foreach (var operation in doc.Paths.SelectMany(static item => item.Value.Operations.Values)) {