From f53a8b45ebbca30289e3bbe423e330d7748d534e Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 9 Jan 2025 15:38:52 +0100 Subject: [PATCH 1/6] Update Microsoft.OpenApi.Kiota version to 1.22.0 in DependencyInstaller and tests --- .../Installer/DependencyInstallerTests.cs | 4 ++-- .../ApiClientCodeGen.Core/Installer/DependencyInstaller.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/ApiClientCodeGen.Core.Tests/Installer/DependencyInstallerTests.cs b/src/Core/ApiClientCodeGen.Core.Tests/Installer/DependencyInstallerTests.cs index dba4542b44..2ab30436cd 100644 --- a/src/Core/ApiClientCodeGen.Core.Tests/Installer/DependencyInstallerTests.cs +++ b/src/Core/ApiClientCodeGen.Core.Tests/Installer/DependencyInstallerTests.cs @@ -99,7 +99,7 @@ public void InstallKiota_Invokes_ProcessLauncher( mock.Verify( c => c.Start( It.IsAny(), - "tool install --global Microsoft.OpenApi.Kiota --version 1.21.0", + "tool install --global Microsoft.OpenApi.Kiota --version 1.22.0", null)); } @@ -113,7 +113,7 @@ public void InstallKiota_Ignores_ProcessLauncherException_For_Already_Installed( .Throws( new ProcessLaunchException( "dotnet", - "tool install --global Microsoft.OpenApi.Kiota --version 1.21.0", + "tool install --global Microsoft.OpenApi.Kiota --version 1.22.0", null, string.Empty, "Tool 'microsoft.openapi.kiota' is already installed.")); diff --git a/src/Core/ApiClientCodeGen.Core/Installer/DependencyInstaller.cs b/src/Core/ApiClientCodeGen.Core/Installer/DependencyInstaller.cs index 4cbcfd7732..9e68268964 100644 --- a/src/Core/ApiClientCodeGen.Core/Installer/DependencyInstaller.cs +++ b/src/Core/ApiClientCodeGen.Core/Installer/DependencyInstaller.cs @@ -71,7 +71,7 @@ public void InstallKiota() Logger.Instance.WriteLine(error); } }); - if (!kiotaVersion.StartsWith("1.21.0")) + if (!kiotaVersion.StartsWith("1.22.0")) { //older or newer? i guess this should be handled. } @@ -80,7 +80,7 @@ public void InstallKiota() { //if command doesn't exist Win32Exception is thrown. command = PathProvider.GetDotNetPath(); - arguments = "tool install --global Microsoft.OpenApi.Kiota --version 1.21.0"; + arguments = "tool install --global Microsoft.OpenApi.Kiota --version 1.22.0"; using var context = new DependencyContext(command, $"{command} {arguments}"); processLauncher.Start(command, arguments); context.Succeeded(); From daf6d3adb4228878c9bd94e51319ffa8a7bdba2f Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 9 Jan 2025 15:39:07 +0100 Subject: [PATCH 2/6] Update KiotaCommand description to Microsoft Kiota (v1.22.0) --- src/CLI/ApiClientCodeGen.CLI/Commands/CSharp/KiotaCommand.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CLI/ApiClientCodeGen.CLI/Commands/CSharp/KiotaCommand.cs b/src/CLI/ApiClientCodeGen.CLI/Commands/CSharp/KiotaCommand.cs index 2534551e3f..21bba5c41d 100644 --- a/src/CLI/ApiClientCodeGen.CLI/Commands/CSharp/KiotaCommand.cs +++ b/src/CLI/ApiClientCodeGen.CLI/Commands/CSharp/KiotaCommand.cs @@ -8,7 +8,7 @@ namespace Rapicgen.CLI.Commands.CSharp; -[Command("kiota", Description = "Microsoft Kiota (v1.21.0)")] +[Command("kiota", Description = "Microsoft Kiota (v1.22.0)")] public class KiotaCommand : CodeGeneratorCommand, IKiotaOptions { private readonly IProcessLauncher processLauncher; From f26f008b6b0821d9f05d6280c61172e506d19df0 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 9 Jan 2025 15:39:13 +0100 Subject: [PATCH 3/6] Update Kiota version to v1.22.0 in KiotaCodeGenerator --- .../Generators/Kiota/KiotaCodeGenerator.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/ApiClientCodeGen.Core/Generators/Kiota/KiotaCodeGenerator.cs b/src/Core/ApiClientCodeGen.Core/Generators/Kiota/KiotaCodeGenerator.cs index eaf9078fe6..4934d54adb 100644 --- a/src/Core/ApiClientCodeGen.Core/Generators/Kiota/KiotaCodeGenerator.cs +++ b/src/Core/ApiClientCodeGen.Core/Generators/Kiota/KiotaCodeGenerator.cs @@ -31,7 +31,7 @@ public string GenerateCode(IProgressReporter? pGenerateProgress) return GeneratedCode.PrefixAutogeneratedCodeHeader( string.Empty, "Kiota", - "v1.21.0"); + "v1.22.0"); } pGenerateProgress?.Progress(30); @@ -87,7 +87,7 @@ public string GenerateCode(IProgressReporter? pGenerateProgress) return GeneratedCode.PrefixAutogeneratedCodeHeader( output, "Kiota", - "v1.21.0"); + "v1.22.0"); } private void RunKiotaGenerate(string outputFolder) From d4ad7277d2dffa93cf23f56881fd6b5fe8a8dd44 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 9 Jan 2025 15:39:20 +0100 Subject: [PATCH 4/6] Update Kiota version to v1.22.0 in command labels for VSIX and VSMac --- src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct | 4 ++-- src/VSIX/ApiClientCodeGen.VSIX/VSCommandTable.vsct | 4 ++-- .../ApiClientCodeGen.VSMac/Properties/Manifest.addin.xml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct b/src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct index 6508cadaa7..0315406fbf 100644 --- a/src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct +++ b/src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct @@ -44,7 +44,7 @@