Skip to content

Commit

Permalink
ensure version is present
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Omondi committed Jun 3, 2024
1 parent 4cf1773 commit 6061f77
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Kiota.Builder/Plugins/PluginsGenerationService.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
Expand Down Expand Up @@ -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))
{
Expand Down

0 comments on commit 6061f77

Please sign in to comment.