From d761e3cf7b8af1b70149009bddaef8627c3b9f64 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 7 Nov 2024 20:52:59 +0100 Subject: [PATCH 1/5] Update Microsoft Kiota dependency version to 1.20.0 in tests and installer --- .../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 0e8442dba1..0a69eee8e4 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.19.1", + "tool install --global Microsoft.OpenApi.Kiota --version 1.20.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.19.1", + "tool install --global Microsoft.OpenApi.Kiota --version 1.20.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 7caafc228f..cd093dc429 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.19.1")) + if (!kiotaVersion.StartsWith("1.20.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.19.1"; + arguments = "tool install --global Microsoft.OpenApi.Kiota --version 1.20.0"; using var context = new DependencyContext(command, $"{command} {arguments}"); processLauncher.Start(command, arguments); context.Succeeded(); From 9d6455569ae661e019dacaff9c7b235db4d4cf77 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 7 Nov 2024 20:53:15 +0100 Subject: [PATCH 2/5] Update KiotaCommand description to Microsoft Kiota (v1.20.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 515ccfa687..49313c05c7 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.19.1)")] +[Command("kiota", Description = "Microsoft Kiota (v1.20.0)")] public class KiotaCommand : CodeGeneratorCommand, IKiotaOptions { private readonly IProcessLauncher processLauncher; From 38d306dece494f9763e64068cd7c2fac1795e6af Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 7 Nov 2024 20:54:05 +0100 Subject: [PATCH 3/5] Update Kiota version to v1.20.0 in header --- .../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 b97c93accc..f95e17f6fb 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.19.1"); + "v1.20.0"); } pGenerateProgress?.Progress(30); @@ -87,7 +87,7 @@ public string GenerateCode(IProgressReporter? pGenerateProgress) return GeneratedCode.PrefixAutogeneratedCodeHeader( output, "Kiota", - "v1.19.1"); + "v1.20.0"); } private void RunKiotaGenerate(string outputFolder) From d6c34ffac8c129f4f096b368c8ce9203f08ea995 Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Thu, 7 Nov 2024 20:54:25 +0100 Subject: [PATCH 4/5] Update Kiota version to v1.20.0 in command labels for VSIX and VSMac extension --- 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 7451a3829e..0fc0d9d97e 100644 --- a/src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct +++ b/src/VSIX/ApiClientCodeGen.VSIX.Dev17/VSCommandTable.vsct @@ -44,7 +44,7 @@