From 1cc92e2e85a38272c25c250ec169f33e8bfe3035 Mon Sep 17 00:00:00 2001 From: Charles Wahome Date: Thu, 3 Oct 2024 13:58:18 +0300 Subject: [PATCH 1/6] Task: create edit paths command (#5517) --- .../src/commands/editPathsCommand.ts | 30 +++++++++++++++++++ vscode/microsoft-kiota/src/extension.ts | 23 +++++--------- .../microsoft-kiota/src/utilities/progress.ts | 17 +++++++++++ 3 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 vscode/microsoft-kiota/src/commands/editPathsCommand.ts create mode 100644 vscode/microsoft-kiota/src/utilities/progress.ts diff --git a/vscode/microsoft-kiota/src/commands/editPathsCommand.ts b/vscode/microsoft-kiota/src/commands/editPathsCommand.ts new file mode 100644 index 0000000000..ce554c6253 --- /dev/null +++ b/vscode/microsoft-kiota/src/commands/editPathsCommand.ts @@ -0,0 +1,30 @@ +import { extensionId, treeViewId } from "../constants"; +import { ClientOrPluginProperties } from "../kiotaInterop"; +import { OpenApiTreeProvider } from "../openApiTreeProvider"; +import { updateTreeViewIcons } from "../util"; +import { openTreeViewWithProgress } from "../utilities/progress"; +import { Command } from "./Command"; + +export class EditPathsCommand extends Command { + + private _openApiTreeProvider: OpenApiTreeProvider; + + public constructor(openApiTreeProvider: OpenApiTreeProvider) { + super(); + this._openApiTreeProvider = openApiTreeProvider; + } + + public getName(): string { + return `${extensionId}.editPaths`; + } + + public async execute({ clientKey, clientObject }: { clientKey: string, clientObject: ClientOrPluginProperties }): Promise { + await this.loadEditPaths(clientKey, clientObject); + this._openApiTreeProvider.resetInitialState(); + await updateTreeViewIcons(treeViewId, false, true); + } + + private async loadEditPaths(clientKey: string, clientObject: ClientOrPluginProperties) { + await openTreeViewWithProgress(() => this._openApiTreeProvider.loadEditPaths(clientKey, clientObject)); + } +} diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index 0ea6a62168..ed20965d37 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -6,6 +6,7 @@ import * as path from 'path'; import * as vscode from "vscode"; import { CodeLensProvider } from "./codelensProvider"; +import { EditPathsCommand } from './commands/editPathsCommand'; import { MigrateFromLockFileCommand } from './commands/migrateFromLockFileCommand'; import { AddAllToSelectedEndpointsCommand } from './commands/open-api-tree-view/addAllToSelectedEndpointsCommand'; import { AddToSelectedEndpointsCommand } from './commands/open-api-tree-view/addToSelectedEndpointsCommand'; @@ -40,6 +41,7 @@ import { parseGenerationType, parsePluginType, updateTreeViewIcons } from "./util"; import { IntegrationParams, isDeeplinkEnabled, transformToGenerationConfig, validateDeepLinkQueryParams } from './utilities/deep-linking'; +import { openTreeViewWithProgress } from './utilities/progress'; import { confirmOverride } from './utilities/regeneration'; import { loadTreeView } from "./workspaceTreeProvider"; @@ -75,6 +77,7 @@ export async function activate( const removeFromSelectedEndpointsCommand = new RemoveFromSelectedEndpointsCommand(openApiTreeProvider); const filterDescriptionCommand = new FilterDescriptionCommand(openApiTreeProvider); const openDocumentationPageCommand = new OpenDocumentationPageCommand(); + const editPathsCommand = new EditPathsCommand(openApiTreeProvider); await loadTreeView(context); await checkForLockFileAndPrompt(context); @@ -303,15 +306,13 @@ export async function activate( } ), registerCommandWithTelemetry(reporter, filterDescriptionCommand.getName(), async () => await filterDescriptionCommand.execute()), - - registerCommandWithTelemetry(reporter, `${extensionId}.editPaths`, async (clientKey: string, clientObject: ClientOrPluginProperties, generationType: string) => { + registerCommandWithTelemetry(reporter, editPathsCommand.getName(), async (clientKey: string, clientObject: ClientOrPluginProperties, generationType: string) => { clientOrPluginKey = clientKey; clientOrPluginObject = clientObject; workspaceGenerationType = generationType; - await loadEditPaths(clientOrPluginKey, clientObject, openApiTreeProvider); - openApiTreeProvider.resetInitialState(); - await updateTreeViewIcons(treeViewId, false, true); + await editPathsCommand.execute({ clientKey, clientObject }); }), + registerCommandWithTelemetry(reporter, `${treeViewId}.regenerateButton`, async () => { const regenerate = await confirmOverride(); if (!regenerate) { @@ -675,17 +676,7 @@ export async function activate( context.subscriptions.push(disposable); } -function openTreeViewWithProgress(callback: () => Promise): Thenable { - return vscode.window.withProgress({ - location: vscode.ProgressLocation.Notification, - cancellable: false, - title: vscode.l10n.t("Loading...") - }, async (progress, _) => { - const result = await callback(); - await vscode.commands.executeCommand(treeViewFocusCommand); - return result; - }); -} + function registerCommandWithTelemetry(reporter: TelemetryReporter, command: string, callback: (...args: any[]) => any, thisArg?: any): vscode.Disposable { return vscode.commands.registerCommand(command, (...args: any[]) => { const splatCommand = command.split('/'); diff --git a/vscode/microsoft-kiota/src/utilities/progress.ts b/vscode/microsoft-kiota/src/utilities/progress.ts new file mode 100644 index 0000000000..ff7a74fa13 --- /dev/null +++ b/vscode/microsoft-kiota/src/utilities/progress.ts @@ -0,0 +1,17 @@ +import * as vscode from "vscode"; + +import { treeViewFocusCommand } from "../constants"; + +function openTreeViewWithProgress(callback: () => Promise): Thenable { + return vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + cancellable: false, + title: vscode.l10n.t("Loading...") + }, async (progress, _) => { + const result = await callback(); + await vscode.commands.executeCommand(treeViewFocusCommand); + return result; + }); +} + +export { openTreeViewWithProgress }; From b79970778437a2cac1633e5dc29282c8ea7c8b10 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 3 Oct 2024 14:54:53 +0300 Subject: [PATCH 2/6] - bumps version for release of 1.19.0 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b18d01bcdd..4e1b1bc8f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +### Changed + +## [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 @@ -1462,3 +1468,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Initial GitHub release + From 27b525eee900ec63ef92d774799690dd21e8952a Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 3 Oct 2024 15:00:39 +0300 Subject: [PATCH 3/6] update extension changelog --- vscode/microsoft-kiota/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vscode/microsoft-kiota/CHANGELOG.md b/vscode/microsoft-kiota/CHANGELOG.md index 05109fe2cd..723e029777 100644 --- a/vscode/microsoft-kiota/CHANGELOG.md +++ b/vscode/microsoft-kiota/CHANGELOG.md @@ -8,6 +8,8 @@ All notable changes to this project will be documented in this file. ### Changed +## [1.19.100000001] - 2024-10-03 + ## [1.19.24092002] - 2024-09-20 ### Changed @@ -25,4 +27,5 @@ All notable changes to this project will be documented in this file. - Bug fixes ### Changed + - Kiota extension logo [#5399](https://github.com/microsoft/kiota/issues/5399) From 1808c82cdae750cdbac9ab86df1a9bf32d311085 Mon Sep 17 00:00:00 2001 From: Charles Wahome Date: Thu, 3 Oct 2024 15:57:41 +0300 Subject: [PATCH 4/6] Task: create search or open api description command (#5520) --- .../searchDescription.ts | 3 +- .../searchOrOpenApiDescriptionCommand.ts | 68 +++++++++++++++++++ vscode/microsoft-kiota/src/extension.ts | 59 ++++------------ .../src/handlers/deepLinkParamsHandler.ts | 11 +++ 4 files changed, 93 insertions(+), 48 deletions(-) rename vscode/microsoft-kiota/src/{ => commands/open-api-tree-view/search-or-open-api-description}/searchDescription.ts (86%) create mode 100644 vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchOrOpenApiDescriptionCommand.ts create mode 100644 vscode/microsoft-kiota/src/handlers/deepLinkParamsHandler.ts diff --git a/vscode/microsoft-kiota/src/searchDescription.ts b/vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchDescription.ts similarity index 86% rename from vscode/microsoft-kiota/src/searchDescription.ts rename to vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchDescription.ts index e69d9afc6a..c1b4e82839 100644 --- a/vscode/microsoft-kiota/src/searchDescription.ts +++ b/vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchDescription.ts @@ -1,7 +1,8 @@ -import { connectToKiota, KiotaSearchResult, KiotaSearchResultItem } from "./kiotaInterop"; import * as rpc from "vscode-jsonrpc/node"; import * as vscode from "vscode"; +import { KiotaSearchResultItem, connectToKiota, KiotaSearchResult } from "../../../kiotaInterop"; + export function searchDescription(context: vscode.ExtensionContext, searchTerm: string, clearCache: boolean): Promise | undefined> { return connectToKiota>(context, async (connection) => { const request = new rpc.RequestType2( diff --git a/vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchOrOpenApiDescriptionCommand.ts b/vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchOrOpenApiDescriptionCommand.ts new file mode 100644 index 0000000000..1f4c3ee157 --- /dev/null +++ b/vscode/microsoft-kiota/src/commands/open-api-tree-view/search-or-open-api-description/searchOrOpenApiDescriptionCommand.ts @@ -0,0 +1,68 @@ +import TelemetryReporter from "@vscode/extension-telemetry"; +import * as vscode from "vscode"; + +import { extensionId, treeViewId } from "../../../constants"; +import { getExtensionSettings } from "../../../extensionSettings"; +import { setDeepLinkParams } from "../../../handlers/deepLinkParamsHandler"; +import { OpenApiTreeProvider } from "../../../openApiTreeProvider"; +import { searchSteps } from "../../../steps"; +import { IntegrationParams, validateDeepLinkQueryParams } from "../../../utilities/deep-linking"; +import { Command } from "../../Command"; +import { searchDescription } from "./searchDescription"; +import { openTreeViewWithProgress } from "../../../utilities/progress"; + +export class SearchOrOpenApiDescriptionCommand extends Command { + + private _openApiTreeProvider: OpenApiTreeProvider; + private _context: vscode.ExtensionContext; + + constructor(openApiTreeProvider: OpenApiTreeProvider, context: vscode.ExtensionContext) { + super(); + this._openApiTreeProvider = openApiTreeProvider; + this._context = context; + } + + public getName(): string { + return `${treeViewId}.searchOrOpenApiDescription`; + } + + public async execute(searchParams: Partial): Promise { + // set deeplink params if exists + if (Object.keys(searchParams).length > 0) { + let [params, errorsArray] = validateDeepLinkQueryParams(searchParams); + setDeepLinkParams(params); + const reporter = new TelemetryReporter(this._context.extension.packageJSON.telemetryInstrumentationKey); + reporter.sendTelemetryEvent("DeepLinked searchOrOpenApiDescription", { + "searchParameters": JSON.stringify(searchParams), + "validationErrors": errorsArray.join(", ") + }); + } + + // proceed to enable loading of openapi description + const yesAnswer = vscode.l10n.t("Yes, override it"); + if (this._openApiTreeProvider.hasChanges()) { + const response = await vscode.window.showWarningMessage( + vscode.l10n.t( + "Before adding a new API description, consider that your changes and current selection will be lost."), + yesAnswer, + vscode.l10n.t("Cancel") + ); + if (response !== yesAnswer) { + return; + } + } + + const config = await searchSteps(x => vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + cancellable: false, + title: vscode.l10n.t("Searching...") + }, (progress, _) => { + const settings = getExtensionSettings(extensionId); + return searchDescription(this._context, x, settings.clearCache); + })); + + if (config.descriptionPath) { + await openTreeViewWithProgress(() => this._openApiTreeProvider.setDescriptionUrl(config.descriptionPath!)); + } + } +} diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index ed20965d37..564d3fd57d 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -14,6 +14,7 @@ import { FilterDescriptionCommand } from './commands/open-api-tree-view/filterDe import { OpenDocumentationPageCommand } from './commands/open-api-tree-view/openDocumentationPageCommand'; import { RemoveAllFromSelectedEndpointsCommand } from './commands/open-api-tree-view/removeAllFromSelectedEndpointsCommand'; import { RemoveFromSelectedEndpointsCommand } from './commands/open-api-tree-view/removeFromSelectedEndpointsCommand'; +import { SearchOrOpenApiDescriptionCommand } from './commands/open-api-tree-view/search-or-open-api-description/searchOrOpenApiDescriptionCommand'; import { KIOTA_WORKSPACE_FILE, dependenciesInfo, extensionId, statusBarCommandId, treeViewFocusCommand, treeViewId } from "./constants"; import { DependenciesViewProvider } from "./dependenciesViewProvider"; import { GenerationType, KiotaGenerationLanguage, KiotaPluginType } from "./enums"; @@ -22,6 +23,7 @@ import { generateClient } from "./generateClient"; import { generatePlugin } from "./generatePlugin"; import { getKiotaVersion } from "./getKiotaVersion"; import { getLanguageInformation, getLanguageInformationForDescription } from "./getLanguageInformation"; +import { clearDeepLinkParams, getDeepLinkParams, setDeepLinkParams } from './handlers/deepLinkParamsHandler'; import { ClientOrPluginProperties, ConsumerOperation, @@ -32,8 +34,7 @@ import { } from "./kiotaInterop"; import { checkForLockFileAndPrompt } from "./migrateFromLockFile"; import { OpenApiTreeNode, OpenApiTreeProvider } from "./openApiTreeProvider"; -import { searchDescription } from "./searchDescription"; -import { GenerateState, generateSteps, searchSteps } from "./steps"; +import { GenerateState, generateSteps } from "./steps"; import { updateClients } from "./updateClients"; import { getSanitizedString, getWorkspaceJsonDirectory, getWorkspaceJsonPath, @@ -78,11 +79,11 @@ export async function activate( const filterDescriptionCommand = new FilterDescriptionCommand(openApiTreeProvider); const openDocumentationPageCommand = new OpenDocumentationPageCommand(); const editPathsCommand = new EditPathsCommand(openApiTreeProvider); + const searchOrOpenApiDescriptionCommand = new SearchOrOpenApiDescriptionCommand(openApiTreeProvider, context); await loadTreeView(context); await checkForLockFileAndPrompt(context); let codeLensProvider = new CodeLensProvider(); - let deepLinkParams: Partial = {}; context.subscriptions.push( vscode.window.registerUriHandler({ handleUri: async (uri: vscode.Uri) => { @@ -91,13 +92,14 @@ export async function activate( } const queryParameters = getQueryParameters(uri); if (uri.path.toLowerCase() === "/opendescription") { - let errorsArray: string[]; - [deepLinkParams, errorsArray] = validateDeepLinkQueryParams(queryParameters); + let [params, errorsArray] = validateDeepLinkQueryParams(queryParameters); + setDeepLinkParams(params); reporter.sendTelemetryEvent("DeepLink.OpenDescription initialization status", { "queryParameters": JSON.stringify(queryParameters), "validationErrors": errorsArray.join(", ") }); + let deepLinkParams = getDeepLinkParams(); if (deepLinkParams.descriptionurl) { await openTreeViewWithProgress(() => openApiTreeProvider.setDescriptionUrl(deepLinkParams.descriptionurl!)); return; @@ -140,6 +142,7 @@ export async function activate( registerCommandWithTelemetry(reporter, `${treeViewId}.generateClient`, async () => { + const deepLinkParams = getDeepLinkParams(); const selectedPaths = openApiTreeProvider.getSelectedPaths(); if (selectedPaths.length === 0) { await vscode.window.showErrorMessage( @@ -237,7 +240,7 @@ export async function activate( } } - deepLinkParams = {}; // Clear the state after the generation + clearDeepLinkParams(); // Clear the state after the generation } } ), @@ -250,47 +253,8 @@ export async function activate( void context.workspaceState.update('generatedOutput', undefined); } }), - registerCommandWithTelemetry( - reporter, - `${treeViewId}.searchOrOpenApiDescription`, - async ( - searchParams: Partial = {} - ) => { - // set deeplink params if exists - if (Object.keys(searchParams).length > 0) { - let errorsArray: string[]; - [deepLinkParams, errorsArray] = validateDeepLinkQueryParams(searchParams); - reporter.sendTelemetryEvent("DeepLinked searchOrOpenApiDescription", { - "searchParameters": JSON.stringify(searchParams), - "validationErrors": errorsArray.join(", ") - }); - } - - // proceed to enable loading of openapi description - const yesAnswer = vscode.l10n.t("Yes, override it"); - if (!openApiTreeProvider.isEmpty() && openApiTreeProvider.hasChanges()) { - const response = await vscode.window.showWarningMessage( - vscode.l10n.t( - "Before adding a new API description, consider that your changes and current selection will be lost."), - yesAnswer, - vscode.l10n.t("Cancel") - ); - if (response !== yesAnswer) { - return; - } - } - const config = await searchSteps(x => vscode.window.withProgress({ - location: vscode.ProgressLocation.Notification, - cancellable: false, - title: vscode.l10n.t("Searching...") - }, (progress, _) => { - const settings = getExtensionSettings(extensionId); - return searchDescription(context, x, settings.clearCache); - })); - if (config.descriptionPath) { - await openTreeViewWithProgress(() => openApiTreeProvider.setDescriptionUrl(config.descriptionPath!)); - } - } + registerCommandWithTelemetry(reporter, searchOrOpenApiDescriptionCommand.getName(), + async (searchParams: Partial = {}) => await searchOrOpenApiDescriptionCommand.execute(searchParams) ), registerCommandWithTelemetry(reporter, `${treeViewId}.closeDescription`, async () => { const yesAnswer = vscode.l10n.t("Yes"); @@ -450,6 +414,7 @@ export async function activate( if (!isSuccess) { await exportLogsAndShowErrors(result); } + const deepLinkParams = getDeepLinkParams(); const isttkIntegration = deepLinkParams.source && deepLinkParams.source.toLowerCase() === 'ttk'; if (!isttkIntegration) { void vscode.window.showInformationMessage(vscode.l10n.t('Plugin generated successfully.')); diff --git a/vscode/microsoft-kiota/src/handlers/deepLinkParamsHandler.ts b/vscode/microsoft-kiota/src/handlers/deepLinkParamsHandler.ts new file mode 100644 index 0000000000..5ed9b6bc56 --- /dev/null +++ b/vscode/microsoft-kiota/src/handlers/deepLinkParamsHandler.ts @@ -0,0 +1,11 @@ +import { IntegrationParams } from "../utilities/deep-linking"; + +let deepLinkParams: Partial = {}; + +export const getDeepLinkParams = () => deepLinkParams; +export const setDeepLinkParams = (params: Partial) => { + deepLinkParams = { ...deepLinkParams, ...params }; +}; +export const clearDeepLinkParams = () => { + deepLinkParams = {}; +}; \ No newline at end of file From 16d592e4983da7adaafe54c46dea63e8f75ff709 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 3 Oct 2024 17:38:44 +0300 Subject: [PATCH 5/6] - bumps version for prerelease of 1.20.0 --- src/Kiota.Builder/Kiota.Builder.csproj | 2 +- src/kiota/kiota.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index 96912deaca..96e8d6962a 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -15,7 +15,7 @@ Microsoft.OpenApi.Kiota.Builder Microsoft.OpenApi.Kiota.Builder ./nupkg - 1.19.0 + 1.20.0 $(VersionSuffix) https://github.com/microsoft/kiota/releases diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 1bc679f1a4..0e9d374060 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -15,7 +15,7 @@ Microsoft.OpenApi.Kiota Microsoft.OpenApi.Kiota ./nupkg - 1.19.0 + 1.20.0 $(VersionSuffix) https://github.com/microsoft/kiota/releases From a62abf632e3baaa5649a73066ba3a31465cd733a Mon Sep 17 00:00:00 2001 From: Caleb Kiage <747955+calebkiage@users.noreply.github.com> Date: Thu, 3 Oct 2024 19:15:53 +0300 Subject: [PATCH 6/6] Fix VSCode's extension update (#5514) * add kiotaVersion property to workspace json file * update workspace JSON schema * Update vscode/microsoft-kiota/src/extension.ts Co-authored-by: Faith Kangai * remove kiotaVersion from workspace configuration update workspace json schema * update json schema version --------- Co-authored-by: Caleb Magiya (from Dev Box) Co-authored-by: Faith Kangai --- specs/schemas/workspace.json | 4 ++-- vscode/microsoft-kiota/src/extension.ts | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/specs/schemas/workspace.json b/specs/schemas/workspace.json index f0c683d415..89b2bb089e 100644 --- a/specs/schemas/workspace.json +++ b/specs/schemas/workspace.json @@ -1,5 +1,5 @@ { - "$schema": "", + "$schema": "https://json-schema.org/2020-12/schema", "type": "object", "properties": { "version": { @@ -104,4 +104,4 @@ } } } -} \ No newline at end of file +} diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index 564d3fd57d..2edb17f965 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -659,9 +659,12 @@ async function showUpgradeWarningMessage(clientPath: string, context: vscode.Ext } const workspaceFileData = await vscode.workspace.fs.readFile(vscode.Uri.file(workspaceFilePath)); const workspaceFile = JSON.parse(workspaceFileData.toString()) as { kiotaVersion: string }; - const clientVersion = workspaceFile.kiotaVersion.toLocaleLowerCase(); - if (clientVersion.toLocaleLowerCase() !== kiotaVersion) { - await vscode.window.showWarningMessage(vscode.l10n.t("Client will be upgraded from version {0} to {1}, upgrade your dependencies", clientVersion, kiotaVersion)); + // don't fail if kiotaVersion isn't in the workspace config file + if (workspaceFile.kiotaVersion) { + const clientVersion = workspaceFile.kiotaVersion.toLocaleLowerCase(); + if (clientVersion !== kiotaVersion) { + await vscode.window.showWarningMessage(vscode.l10n.t("Client will be upgraded from version {0} to {1}, upgrade your dependencies", clientVersion, kiotaVersion)); + } } }