From 1820d95b05fa8c00fb3011379ae4d57103a61749 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 09:36:45 -0400 Subject: [PATCH 1/9] - adds kiota as a known spell check word --- vscode/microsoft-kiota/.vscode/settings.json | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vscode/microsoft-kiota/.vscode/settings.json b/vscode/microsoft-kiota/.vscode/settings.json index 5c5ac48c52..d521a476a8 100644 --- a/vscode/microsoft-kiota/.vscode/settings.json +++ b/vscode/microsoft-kiota/.vscode/settings.json @@ -9,5 +9,8 @@ "dist": true // set this to false to include "dist" folder in search results }, // Turn off tsc task auto detection since we have the necessary tasks as npm scripts - "typescript.tsc.autoDetect": "off" -} \ No newline at end of file + "typescript.tsc.autoDetect": "off", + "cSpell.words": [ + "Kiota" + ] +} From 32661f03f69c4013a25477d1a95aad9b02a5e37f Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 09:38:29 -0400 Subject: [PATCH 2/9] - bumps extension version for debugging --- vscode/microsoft-kiota/package-lock.json | 2 +- vscode/microsoft-kiota/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index b94bd7a08c..a93dc1fab1 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -1,6 +1,6 @@ { "name": "kiota", - "version": "1.1.3", + "version": "1.2.0", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index a591ae4e28..2d40fcf1b2 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -3,7 +3,7 @@ "displayName": "Microsoft Kiota", "publisher": "ms-graph", "description": "Client generator for HTTP REST APIs described by OpenAPI which helps eliminate the need to take a dependency on a different API client for every API that you need to call, as well as limiting the generation to the exact API surface area you're interested in, thanks to a filtering capability.", - "version": "1.1.3", + "version": "1.2.0", "icon": "images/logo.png", "engines": { "vscode": "^1.78.0" From 029dc7de908b536647f3c157a23d8ee5101ffa9a Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 09:42:07 -0400 Subject: [PATCH 3/9] - fixes flaky selection with multiple indexers in the extension --- CHANGELOG.md | 1 + vscode/microsoft-kiota/src/openApiTreeProvider.ts | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da42b3beac..88006decca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Fixed a bug where Operation filters would be greedy and exclude non operation filters. [#2651](https://github.com/microsoft/kiota/issues/2651) - Shorten Go File names to a max of 252 - Fixed a bug where clean output option would fail because of the log file. [#2645](https://github.com/microsoft/kiota/issues/2645) +- Fixed a bug in the extension where selection in multiple indexers would fail. [#2666](https://github.com/microsoft/kiota/issues/2666) ## [1.2.0] - 2023-05-04 diff --git a/vscode/microsoft-kiota/src/openApiTreeProvider.ts b/vscode/microsoft-kiota/src/openApiTreeProvider.ts index dce2a922b5..030ee7830d 100644 --- a/vscode/microsoft-kiota/src/openApiTreeProvider.ts +++ b/vscode/microsoft-kiota/src/openApiTreeProvider.ts @@ -110,9 +110,15 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider x.segment === segment); + let child = currentNode.children.find(x => x.segment === segment); if (child) { return this.findApiNode(segments, child); + } else if (segment.startsWith('{') && segment.endsWith('}')) { + // in case there are multiple single parameters nodes with different names at the same level + child = currentNode.children.find(x => x.segment.startsWith('{') && x.segment.endsWith('}')); + if (child) { + return this.findApiNode(segments, child); + } } } return undefined; From e6ba8bd664537d93b690a1a54d326ceeb05d41b3 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 09:55:25 -0400 Subject: [PATCH 4/9] - bumps version for patch Signed-off-by: Vincent Biret --- CHANGELOG.md | 4 ++++ src/Kiota.Builder/Kiota.Builder.csproj | 2 +- src/Kiota.Web/wwwroot/appsettings.json | 20 ++++++++++---------- src/kiota/appsettings.json | 20 ++++++++++---------- src/kiota/kiota.csproj | 2 +- 5 files changed, 26 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88006decca..8f8c8e0c56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +## [1.2.1] - 2023-05-16 + +### Changed + - Fixed a bug where Operation filters would be greedy and exclude non operation filters. [#2651](https://github.com/microsoft/kiota/issues/2651) - Shorten Go File names to a max of 252 - Fixed a bug where clean output option would fail because of the log file. [#2645](https://github.com/microsoft/kiota/issues/2645) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index 5a8e07b948..dbce9d17a5 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -14,7 +14,7 @@ Microsoft.OpenApi.Kiota.Builder Microsoft.OpenApi.Kiota.Builder ./nupkg - 1.2.0 + 1.2.1 https://github.com/microsoft/kiota/releases diff --git a/src/Kiota.Web/wwwroot/appsettings.json b/src/Kiota.Web/wwwroot/appsettings.json index 67959b7d4a..26cae5efcd 100644 --- a/src/Kiota.Web/wwwroot/appsettings.json +++ b/src/Kiota.Web/wwwroot/appsettings.json @@ -111,27 +111,27 @@ "Dependencies": [ { "Name": "@microsoft/kiota-abstractions", - "Version": "1.0.0-preview.16" + "Version": "1.0.0-preview.18" }, { "Name": "@microsoft/kiota-http-fetchlibrary", - "Version": "1.0.0-preview.15" + "Version": "1.0.0-preview.17" }, { "Name": "@microsoft/kiota-serialization-form", - "Version": "1.0.0-preview.6" + "Version": "1.0.0-preview.7" }, { "Name": "@microsoft/kiota-serialization-json", - "Version": "1.0.0-preview.15" + "Version": "1.0.0-preview.16" }, { "Name": "@microsoft/kiota-authentication-azure", - "Version": "1.0.0-preview.12" + "Version": "1.0.0-preview.13" }, { "Name": "@microsoft/kiota-serialization-text", - "Version": "1.0.0-preview.14" + "Version": "1.0.0-preview.15" } ], "DependencyInstallCommand": "npm install {0}@{1} -S" @@ -141,11 +141,11 @@ "Dependencies": [ { "Name": "microsoft/kiota-abstractions", - "Version": "0.6.5" + "Version": "0.6.7" }, { "Name": "microsoft/kiota-http-guzzle", - "Version": "0.6.2" + "Version": "0.6.3" }, { "Name": "microsoft/kiota-serialization-json", @@ -171,11 +171,11 @@ }, { "Name": "microsoft-kiota-http", - "Version": "0.4.1" + "Version": "0.4.3" }, { "Name": "microsoft-kiota-serialization-json", - "Version": "0.3.2" + "Version": "0.3.3" }, { "Name": "microsoft-kiota-authentication-azure", diff --git a/src/kiota/appsettings.json b/src/kiota/appsettings.json index 67959b7d4a..26cae5efcd 100644 --- a/src/kiota/appsettings.json +++ b/src/kiota/appsettings.json @@ -111,27 +111,27 @@ "Dependencies": [ { "Name": "@microsoft/kiota-abstractions", - "Version": "1.0.0-preview.16" + "Version": "1.0.0-preview.18" }, { "Name": "@microsoft/kiota-http-fetchlibrary", - "Version": "1.0.0-preview.15" + "Version": "1.0.0-preview.17" }, { "Name": "@microsoft/kiota-serialization-form", - "Version": "1.0.0-preview.6" + "Version": "1.0.0-preview.7" }, { "Name": "@microsoft/kiota-serialization-json", - "Version": "1.0.0-preview.15" + "Version": "1.0.0-preview.16" }, { "Name": "@microsoft/kiota-authentication-azure", - "Version": "1.0.0-preview.12" + "Version": "1.0.0-preview.13" }, { "Name": "@microsoft/kiota-serialization-text", - "Version": "1.0.0-preview.14" + "Version": "1.0.0-preview.15" } ], "DependencyInstallCommand": "npm install {0}@{1} -S" @@ -141,11 +141,11 @@ "Dependencies": [ { "Name": "microsoft/kiota-abstractions", - "Version": "0.6.5" + "Version": "0.6.7" }, { "Name": "microsoft/kiota-http-guzzle", - "Version": "0.6.2" + "Version": "0.6.3" }, { "Name": "microsoft/kiota-serialization-json", @@ -171,11 +171,11 @@ }, { "Name": "microsoft-kiota-http", - "Version": "0.4.1" + "Version": "0.4.3" }, { "Name": "microsoft-kiota-serialization-json", - "Version": "0.3.2" + "Version": "0.3.3" }, { "Name": "microsoft-kiota-authentication-azure", diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 290f576523..609ba42633 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -14,7 +14,7 @@ Microsoft.OpenApi.Kiota Microsoft.OpenApi.Kiota ./nupkg - 1.2.0 + 1.2.1 https://github.com/microsoft/kiota/releases From c16409cf3c75a37a987d21a13c22ea746c97a1d1 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 10:49:34 -0400 Subject: [PATCH 5/9] - adds progress bar for search and loading description --- vscode/microsoft-kiota/l10n/bundle.l10n.fr.json | 3 ++- vscode/microsoft-kiota/src/extension.ts | 8 +++++++- vscode/microsoft-kiota/src/openApiTreeProvider.ts | 8 +++++++- vscode/microsoft-kiota/src/steps.ts | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json b/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json index 6f6e2a7e56..2c3ef7f7a7 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.fr.json @@ -31,5 +31,6 @@ "Pick a lock file": "Sélectionnez un fichier verrou", "Open a lock file": "Ouvrir un fichier verrou", "Filter the API description": "Filtrer la description d'API", - "Enter a filter": "Entrez un filtre" + "Enter a filter": "Entrez un filtre", + "Searching...": "Recherche en cours..." } diff --git a/vscode/microsoft-kiota/src/extension.ts b/vscode/microsoft-kiota/src/extension.ts index 83021373e3..4bef22e01c 100644 --- a/vscode/microsoft-kiota/src/extension.ts +++ b/vscode/microsoft-kiota/src/extension.ts @@ -176,7 +176,13 @@ export async function activate( vscode.commands.registerCommand( `${extensionId}.searchApiDescription`, async () => { - const config = await searchSteps(x => searchDescription(context, x)); + const config = await searchSteps(x => vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + cancellable: false, + title: vscode.l10n.t("Searching...") + }, (progress, _) => { + return searchDescription(context, x); + })); if (config.descriptionPath) { await openApiTreeProvider.setDescriptionUrl(config.descriptionPath); await vscode.commands.executeCommand(`${treeViewId}${focusCommandId}`); diff --git a/vscode/microsoft-kiota/src/openApiTreeProvider.ts b/vscode/microsoft-kiota/src/openApiTreeProvider.ts index 030ee7830d..c42ae96c75 100644 --- a/vscode/microsoft-kiota/src/openApiTreeProvider.ts +++ b/vscode/microsoft-kiota/src/openApiTreeProvider.ts @@ -74,7 +74,13 @@ export class OpenApiTreeProvider implements vscode.TreeDataProvider { this.closeDescription(false); this._descriptionUrl = descriptionUrl; - await this.loadNodes(); + await vscode.window.withProgress({ + location: vscode.ProgressLocation.Notification, + cancellable: false, + title: vscode.l10n.t("Loading...") + }, (progress, _) => { + return this.loadNodes(); + }); this.refreshView(); } public get descriptionUrl(): string { diff --git a/vscode/microsoft-kiota/src/steps.ts b/vscode/microsoft-kiota/src/steps.ts index 8f77a99dde..9e44a80b93 100644 --- a/vscode/microsoft-kiota/src/steps.ts +++ b/vscode/microsoft-kiota/src/steps.ts @@ -74,7 +74,7 @@ export async function filterSteps(existingFilter: string, filterCallback: (searc return state; } -export async function searchSteps(searchCallBack: (searchQuery: string) => Promise | undefined>) { +export async function searchSteps(searchCallBack: (searchQuery: string) => Thenable | undefined>) { const state = {} as Partial; const title = l10n.t('Search for an API description'); let step = 1; From 2574d03647c1508ce3740c6356c57bb7b00ef711 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 10:56:56 -0400 Subject: [PATCH 6/9] - adds placeholder translations for sw, pt, es, cn and ru --- vscode/microsoft-kiota/l10n/bundle.l10n.ar.json | 3 ++- vscode/microsoft-kiota/l10n/bundle.l10n.es.json | 3 ++- vscode/microsoft-kiota/l10n/bundle.l10n.pt.json | 3 ++- vscode/microsoft-kiota/l10n/bundle.l10n.ru.json | 3 ++- vscode/microsoft-kiota/l10n/bundle.l10n.sw.json | 3 ++- vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json b/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json index 24b4ec0427..caa6a8f5cf 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.ar.json @@ -31,5 +31,6 @@ "Pick a lock file": "اختر ملف قفل", "Open a lock file": "افتح ملف قفل", "Filter the API description": "قم بتصفية وصف API", - "Enter a filter": "أدخل عامل التصفية" + "Enter a filter": "أدخل عامل التصفية", + "Searching...": "جاري البحث..." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.es.json b/vscode/microsoft-kiota/l10n/bundle.l10n.es.json index 152eade0f7..5501984687 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.es.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.es.json @@ -31,5 +31,6 @@ "Pick a lock file": "Seleccionar un archivo lock", "Open a lock file": "Abrir un archivo lock", "Filter the API description": "Filtrar descripción de API", - "Enter a filter": "Ingresar un filtro" + "Enter a filter": "Ingresar un filtro", + "Searching...": "Buscando..." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json b/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json index b5b6a410ef..e927999bba 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json @@ -31,5 +31,6 @@ "Pick a lock file": "Selecionar um arquivo lock", "Open a lock file": "Abrir um arquivo lock", "Filter the API description": "Filtrar descrição da API", - "Enter a filter": "Adicionar um filtro" + "Enter a filter": "Adicionar um filtro", + "Searching...": "Procurando..." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json b/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json index efdb3fac8e..e97b6e19c7 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.ru.json @@ -30,5 +30,6 @@ "Pick a lock file": "Выбрать файл блокировки", "Open a lock file": "Открыть файл блокировки", "Filter the API description": "Отфильтровать описание API", - "Enter a filter": "Ввести фильтр" + "Enter a filter": "Ввести фильтр", + "Searching...": "Поиск..." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json b/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json index 79270d32d9..baf554085f 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.sw.json @@ -31,5 +31,6 @@ "Pick a lock file": "Chagua faili ya kufunga", "Open a lock file": "Fungua faili ya kufunga", "Filter the API description": "Chuja maelezo ya API", - "Enter a filter": "Ingiza kichujio" + "Enter a filter": "Ingiza kichujio", + "Searching...": "Inatafuta..." } diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json b/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json index 72dc18998c..65f134700a 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.zh-cn.json @@ -30,5 +30,6 @@ "Pick a lock file": "请选择一个锁定文件", "Open a lock file": "请打开一个锁定文件", "Filter the API description": "筛选API描述", - "Enter a filter": "输入一个筛选项" + "Enter a filter": "输入一个筛选项", + "Searching...": "搜索中..." } From 192e2811975a00ad70ea9a5c0154825bcbb3cdd3 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 11:02:12 -0400 Subject: [PATCH 7/9] - updates pt placeholder --- vscode/microsoft-kiota/l10n/bundle.l10n.pt.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json b/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json index e927999bba..55fbc5c965 100644 --- a/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json +++ b/vscode/microsoft-kiota/l10n/bundle.l10n.pt.json @@ -32,5 +32,5 @@ "Open a lock file": "Abrir um arquivo lock", "Filter the API description": "Filtrar descrição da API", "Enter a filter": "Adicionar um filtro", - "Searching...": "Procurando..." + "Searching...": "Buscando..." } From 38551a23b3effbb23a52c92d5f6041466c739783 Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 11:23:36 -0400 Subject: [PATCH 8/9] - suppressing source generation warnings to unblock builds Signed-off-by: Vincent Biret --- src/Kiota.Builder/Kiota.Builder.csproj | 4 ++++ src/kiota/kiota.csproj | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index dbce9d17a5..a483778f5c 100644 --- a/src/Kiota.Builder/Kiota.Builder.csproj +++ b/src/Kiota.Builder/Kiota.Builder.csproj @@ -28,6 +28,10 @@ true + + $(NoWarn);CS8785 + + diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 609ba42633..6278f1c9d1 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -29,6 +29,10 @@ true + + $(NoWarn);CS8785 + + From 56a09fa94c9459d0063ff67a3f19f7d973d0e9bd Mon Sep 17 00:00:00 2001 From: Vincent Biret Date: Tue, 16 May 2023 12:00:58 -0400 Subject: [PATCH 9/9] - updates download hashes --- vscode/microsoft-kiota/package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index 2d40fcf1b2..e6bc3546a1 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -21,7 +21,7 @@ "main": "./dist/extension.js", "l10n": "./l10n", "contributes": { - "viewsWelcome":[ + "viewsWelcome": [ { "view": "kiota.openApiExplorer", "contents": "%kiota.openApiExplorer.welcome%" @@ -271,23 +271,23 @@ "runtimeDependencies": [ { "platformId": "win-x64", - "sha256": "46FD2CFA88340AF8A9DED5BD2643DA7A4E28FEDC5C4FFC9A2414041027DB288B" + "sha256": "CAF3532A21568481A730E62475E683BC30AA596BB47284AD42F395D6AE898D79" }, { "platformId": "win-x86", - "sha256": "FCE85F9310967728431461C0DDD6864041EA262081930494F8D4B8A3B7C180C9" + "sha256": "E3205AA7FEDF868746EB5165098D12843E29367D0E43A6B397AEDCF9A024CF55" }, { "platformId": "linux-x64", - "sha256": "6E6763B7D855F43B8C6F4659C13C4D3E9EB085B60A0806E9B6B18BEE828CF2CC" + "sha256": "9261D5F803862B01D9777B74D59D446899AD54C5644B6F04772F067A4DBB2842" }, { "platformId": "osx-x64", - "sha256": "6266A2E02247461EB8C4B7FF0EA45E34DDC6AF05490D5CA26F838DE73D984ACA" + "sha256": "6DCCF6D6239A80029F8363E0664155306764E3E865CC288FDABD99C9CD27C500" }, { "platformId": "osx-arm64", - "sha256": "909D2888AD236EE4D7B7A30D09C73C30C0B9957643FB71CC3C77DB66E9B7C11C" + "sha256": "2FD7BE327786962B53D3CDDD7D9C0CFE4B7D608E9B8ED4D3D3342A8DD8DDE62A" } ] }