diff --git a/CHANGELOG.md b/CHANGELOG.md index fa79ccaa29..f7ad046f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] -### Changed -- Implemented partial class model declarations. [4894](https://github.com/microsoft/kiota/issues/4894) - ### Added ### Changed +- Implemented partial class model declarations. [4894](https://github.com/microsoft/kiota/issues/4894) - Fixes bug with model names in Go generated from camel case namespace. [https://github.com/microsoftgraph/msgraph-sdk-go/issues/721] - Plugins OpenAPI extensions are only added when generating plugins to reduce the risk of parsing errors. [#4834](https://github.com/microsoft/kiota/issues/4834) - TypeScript imports are now using ES6 imports with the .js extension. @@ -21,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Ensures descriptions are not empty in sliced OpenApi file when generating a plugin. - Plugins do not emit parameters anymore. [#4841](https://github.com/microsoft/kiota/issues/4841) - References to C# types generated by kiota are prefixed with `global::` to avoid name collisions. [#4796](https://github.com/microsoft/kiota/issues/4796) +- Dropped `client base url set to` message when generating plugins. [#4905](https://github.com/microsoft/kiota/issues/4905) ## [1.15.0] - 2024-06-06 diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index 226e831e78..f3535b3cf0 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -432,7 +432,10 @@ internal void SetApiRootUrl() if (openApiDocument is not null && openApiDocument.GetAPIRootUrl(config.OpenAPIFilePath) is string candidateUrl) { config.ApiRootUrl = candidateUrl; - logger.LogInformation("Client root URL set to {ApiRootUrl}", candidateUrl); + if (!config.IsPluginConfiguration) + { + logger.LogInformation("Client root URL set to {ApiRootUrl}", candidateUrl); + } } else logger.LogWarning("No server url found in the OpenAPI document. The base url will need to be set when using the client."); diff --git a/src/kiota/Handlers/BaseKiotaCommandHandler.cs b/src/kiota/Handlers/BaseKiotaCommandHandler.cs index 5cf3f62755..e6649c01c9 100644 --- a/src/kiota/Handlers/BaseKiotaCommandHandler.cs +++ b/src/kiota/Handlers/BaseKiotaCommandHandler.cs @@ -310,8 +310,8 @@ private static string GetSourceArg(string path, string manifest) } protected void DisplayUrlInformation(string? apiRootUrl, bool isPlugin = false) { - if (!string.IsNullOrEmpty(apiRootUrl)) - DisplayInfo($"{(isPlugin ? "Plugin" : "Client")} base url set to {apiRootUrl}"); + if (!string.IsNullOrEmpty(apiRootUrl) && !isPlugin) + DisplayInfo($"Client base url set to {apiRootUrl}"); } protected void DisplayGenerateCommandHint() { diff --git a/src/kiota/Handlers/Plugin/AddHandler.cs b/src/kiota/Handlers/Plugin/AddHandler.cs index bb31d1a269..e6bfc11e91 100644 --- a/src/kiota/Handlers/Plugin/AddHandler.cs +++ b/src/kiota/Handlers/Plugin/AddHandler.cs @@ -75,7 +75,7 @@ public override async Task InvokeAsync(InvocationContext context) if (result) { DisplaySuccess("Generation completed successfully"); - DisplayUrlInformation(Configuration.Generation.ApiRootUrl); + DisplayUrlInformation(Configuration.Generation.ApiRootUrl, true); } else if (skipGeneration) { diff --git a/src/kiota/Handlers/Plugin/EditHandler.cs b/src/kiota/Handlers/Plugin/EditHandler.cs index a005fed5d1..895c48504d 100644 --- a/src/kiota/Handlers/Plugin/EditHandler.cs +++ b/src/kiota/Handlers/Plugin/EditHandler.cs @@ -92,7 +92,7 @@ public override async Task InvokeAsync(InvocationContext context) if (result) { DisplaySuccess("Generation completed successfully"); - DisplayUrlInformation(Configuration.Generation.ApiRootUrl); + DisplayUrlInformation(Configuration.Generation.ApiRootUrl, true); } else if (skipGeneration) {