From 5789c8c37bc105a46db4222d8b3efb4421e04214 Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Fri, 4 Oct 2024 19:27:32 +0300 Subject: [PATCH 1/3] Write to kiota directory on edit and generate --- src/kiota/Handlers/Plugin/EditHandler.cs | 2 +- src/kiota/Handlers/Plugin/GenerateHandler.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kiota/Handlers/Plugin/EditHandler.cs b/src/kiota/Handlers/Plugin/EditHandler.cs index a228fed51a..3f5a41a4d6 100644 --- a/src/kiota/Handlers/Plugin/EditHandler.cs +++ b/src/kiota/Handlers/Plugin/EditHandler.cs @@ -70,7 +70,7 @@ public override async Task InvokeAsync(InvocationContext context) Configuration.Generation.Operation = ConsumerOperation.Edit; if (pluginAuthType.HasValue && !string.IsNullOrWhiteSpace(pluginAuthRefId)) Configuration.Generation.PluginAuthInformation = PluginAuthConfiguration.FromParameters(pluginAuthType, pluginAuthRefId); - var (loggerFactory, logger) = GetLoggerAndFactory(context, Configuration.Generation.OutputPath); + var (loggerFactory, logger) = GetLoggerAndFactory(context, $"./{DescriptionStorageService.KiotaDirectorySegment}"); using (loggerFactory) { await CheckForNewVersionAsync(logger, cancellationToken).ConfigureAwait(false); diff --git a/src/kiota/Handlers/Plugin/GenerateHandler.cs b/src/kiota/Handlers/Plugin/GenerateHandler.cs index d62e3d5525..415a14e409 100644 --- a/src/kiota/Handlers/Plugin/GenerateHandler.cs +++ b/src/kiota/Handlers/Plugin/GenerateHandler.cs @@ -23,7 +23,7 @@ public override async Task InvokeAsync(InvocationContext context) string className = context.ParseResult.GetValueForOption(ClassOption) ?? string.Empty; bool refresh = context.ParseResult.GetValueForOption(RefreshOption); CancellationToken cancellationToken = context.BindingContext.GetService(typeof(CancellationToken)) is CancellationToken token ? token : CancellationToken.None; - var (loggerFactory, logger) = GetLoggerAndFactory(context, Configuration.Generation.OutputPath); + var (loggerFactory, logger) = GetLoggerAndFactory(context, $"./{DescriptionStorageService.KiotaDirectorySegment}"); using (loggerFactory) { await CheckForNewVersionAsync(logger, cancellationToken).ConfigureAwait(false); From 47b99dfe63363250f40a6853d514dfa921d54b6e Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Fri, 4 Oct 2024 19:29:57 +0300 Subject: [PATCH 2/3] Add CHANGELOG entry --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 40aab1df90..7563830fd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -38,7 +38,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Removed registration of default serialization and deserialization classes in client constructor. [#5478](https://github.com/microsoft/kiota/pull/5478) - Fixed incorrect type name generation in aliased scenario in TS due to broad searching of types in root namespaces. [#5404](https://github.com/microsoft/kiota/issues/5404) - Fixed incorrect type mapping in request builders with subsequent paths with the same name. [#5462](https://github.com/microsoft/kiota/issues/5462) -- Fixed multipart generation to default Content-Types are defined for multipart [#5504](https://github.com/microsoft/kiota/issues/5504) +- Fixed multipart generation to default Content-Types are defined for multipart [#5504](https://github.com/microsoft/kiota/issues/5504) +- Fixed a bug where default output folder is created on plugin edit and generate commands. [#5510](https://github.com/microsoft/kiota/issues/5429) ## [1.18.0] - 2024-09-05 From 8595fb639a6b8e3dfe9b94b49e904d2fff5ea0aa Mon Sep 17 00:00:00 2001 From: samwelkanda Date: Mon, 7 Oct 2024 12:24:48 +0300 Subject: [PATCH 3/3] Correct CHANGELOG entry --- CHANGELOG.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edd79c50fd..123721dca8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,13 +13,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- Fixed cyclic depencies in generated Go code. [#2834](https://github.com/microsoft/kiota/issues/2834) +- Fixed cyclic dependencies in generated Go code. [#2834](https://github.com/microsoft/kiota/issues/2834) +- Fixed a bug where default output folder is created on plugin edit and generate commands. [#5510](https://github.com/microsoft/kiota/issues/5429) ## [1.19.0] - 2024-10-03 ### Added - Control generated type access modifier for C# via `--type-access-modifier` flag. [#4788](https://github.com/microsoft/kiota/issues/4788) +- ### Changed @@ -41,7 +43,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed incorrect type name generation in aliased scenario in TS due to broad searching of types in root namespaces. [#5404](https://github.com/microsoft/kiota/issues/5404) - Fixed incorrect type mapping in request builders with subsequent paths with the same name. [#5462](https://github.com/microsoft/kiota/issues/5462) - Fixed multipart generation to default Content-Types are defined for multipart [#5504](https://github.com/microsoft/kiota/issues/5504) -- Fixed a bug where default output folder is created on plugin edit and generate commands. [#5510](https://github.com/microsoft/kiota/issues/5429) ## [1.18.0] - 2024-09-05