From a535fa719df9131d5a98cf0091dc743f38858ef8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 08:54:14 +0000 Subject: [PATCH 01/32] Bump glob from 10.3.10 to 10.3.12 in /vscode/microsoft-kiota Bumps [glob](https://github.com/isaacs/node-glob) from 10.3.10 to 10.3.12. - [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md) - [Commits](https://github.com/isaacs/node-glob/compare/v10.3.10...v10.3.12) --- updated-dependencies: - dependency-name: glob dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 40 ++++++++++++------------ vscode/microsoft-kiota/package.json | 2 +- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index b69619ac63..2669606ddb 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -24,7 +24,7 @@ "@typescript-eslint/parser": "^7.4.0", "@vscode/test-electron": "^2.3.9", "eslint": "^8.57.0", - "glob": "^10.3.10", + "glob": "^10.3.12", "mocha": "^10.4.0", "ts-loader": "^9.5.1", "typescript": "^5.4.3", @@ -2059,16 +2059,16 @@ } }, "node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "version": "10.3.12", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.12.tgz", + "integrity": "sha512-TCNv8vJ+xz4QiqTpfOJA7HvYv+tNIRHKfUWw/q+v2jdgN4ebz+KY9tGx5J4rHP0o84mNP+ApH66HRX8us3Khqg==", "dev": true, "dependencies": { "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", + "jackspeak": "^2.3.6", "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" + "minipass": "^7.0.4", + "path-scurry": "^1.10.2" }, "bin": { "glob": "dist/esm/bin.mjs" @@ -2525,9 +2525,9 @@ } }, "node_modules/jackspeak": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.5.tgz", - "integrity": "sha512-Ratx+B8WeXLAtRJn26hrhY8S1+Jz6pxPMrkrdkgb/NstTNiqMhX0/oFVu5wX+g5n6JlEu2LPsDJmY8nRP4+alw==", + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", "dev": true, "dependencies": { "@isaacs/cliui": "^8.0.2" @@ -2715,9 +2715,9 @@ } }, "node_modules/lru-cache": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.0.tgz", - "integrity": "sha512-svTf/fzsKHffP42sujkO/Rjs37BCIsQVRCeNYIm9WN8rgT7ffoUnRtZCqU+6BqcSBdv8gwJeTz8knJpgACeQMw==", + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", "dev": true, "engines": { "node": "14 || >=16.14" @@ -2796,9 +2796,9 @@ } }, "node_modules/minipass": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.2.tgz", - "integrity": "sha512-eL79dXrE1q9dBbDCLg7xfn/vl7MS4F1gvJAgjJrQli/jbQWdUttuVawphqpffoIYfRdq78LHx6GP4bU/EQ2ATA==", + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", "dev": true, "engines": { "node": ">=16 || 14 >=14.17" @@ -3115,12 +3115,12 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", - "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.2.tgz", + "integrity": "sha512-7xTavNy5RQXnsjANvVvMkEjvloOinkAjv/Z6Ildz9v2RinZ4SBKTWFOVRbaF8p0vpHnyjV/UwNDdKuUv6M5qcA==", "dev": true, "dependencies": { - "lru-cache": "^9.1.1 || ^10.0.0", + "lru-cache": "^10.2.0", "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" }, "engines": { diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index 2488b3de99..258149a578 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -431,7 +431,7 @@ "@typescript-eslint/parser": "^7.4.0", "@vscode/test-electron": "^2.3.9", "eslint": "^8.57.0", - "glob": "^10.3.10", + "glob": "^10.3.12", "mocha": "^10.4.0", "ts-loader": "^9.5.1", "typescript": "^5.4.3", From def95cda4f25f7128e9188582ecfc699e80283ce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 08:38:22 +0000 Subject: [PATCH 02/32] Bump @types/node from 20.11.30 to 20.12.2 in /vscode/microsoft-kiota Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.30 to 20.12.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index 2669606ddb..54864b85c7 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -492,9 +492,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", - "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", + "version": "20.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", + "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" From 19f23b23e24f80b47ba13c5da4a8de635ef42953 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 09:00:26 +0000 Subject: [PATCH 03/32] Bump pycparser from 2.21 to 2.22 in /it/python Bumps [pycparser](https://github.com/eliben/pycparser) from 2.21 to 2.22. - [Release notes](https://github.com/eliben/pycparser/releases) - [Changelog](https://github.com/eliben/pycparser/blob/main/CHANGES) - [Commits](https://github.com/eliben/pycparser/compare/release_v2.21...release_v2.22) --- updated-dependencies: - dependency-name: pycparser dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- it/python/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/python/requirements-dev.txt b/it/python/requirements-dev.txt index 9e5d121244..334f6fddef 100644 --- a/it/python/requirements-dev.txt +++ b/it/python/requirements-dev.txt @@ -120,7 +120,7 @@ multidict==6.0.5 ; python_version >= '3.7' portalocker==2.8.2 ; python_version >= '3.5' and platform_system == 'Windows' -pycparser==2.21 +pycparser==2.22 pyjwt[crypto]==2.8.0 ; python_version >= '3.7' From 08c525410bf36ed235e969c3ec7aa7ac0bd78fe0 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 1 Apr 2024 13:37:15 +0100 Subject: [PATCH 04/32] [TS] Fix 4426 --- .github/workflows/integration-tests.yml | 3 +- it/typescript/package.json | 4 +- it/typescript/src/app/app.ts | 4 +- it/typescript/src/app/client/apiClient.ts | 56 +++++++++++++++++++ it/typescript/src/app/client/kiota-lock.json | 32 +++++++++++ it/typescript/src/app/client/models/index.ts | 12 ++++ it/typescript/src/app/client/play/index.ts | 42 ++++++++++++++ .../Refiners/TypeScriptRefiner.cs | 24 +++++++- .../Writers/TypeScript/CodeConstantWriter.cs | 9 ++- .../EnumHandling.yaml | 29 ++++++++++ .../GenerateSample.cs | 22 ++++++++ .../Kiota.Builder.IntegrationTests.csproj | 3 + 12 files changed, 233 insertions(+), 7 deletions(-) create mode 100644 it/typescript/src/app/client/apiClient.ts create mode 100644 it/typescript/src/app/client/kiota-lock.json create mode 100644 it/typescript/src/app/client/models/index.ts create mode 100644 it/typescript/src/app/client/play/index.ts create mode 100644 tests/Kiota.Builder.IntegrationTests/EnumHandling.yaml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 8e1fc56376..af6046f4b4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -45,6 +45,7 @@ jobs: - python description: - "./tests/Kiota.Builder.IntegrationTests/InheritingErrors.yaml" + - "./tests/Kiota.Builder.IntegrationTests/EnumHandling.yaml" - "./tests/Kiota.Builder.IntegrationTests/NoUnderscoresInModel.yaml" - "./tests/Kiota.Builder.IntegrationTests/ToDoApi.yaml" - "./tests/Kiota.Builder.IntegrationTests/GeneratesUritemplateHints.yaml" @@ -59,7 +60,7 @@ jobs: - "apisguru::docusign.net" - "apisguru::github.com:api.github.com" - "apisguru::apis.guru" - + steps: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 diff --git a/it/typescript/package.json b/it/typescript/package.json index 255849aaba..2369ac4f71 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -3,7 +3,7 @@ "version": "0.0.1", "license": "MIT", "scripts": { - "build": "node ./build/esbuild.js --dev", + "build": "tsc -noEmit && node ./build/esbuild.js --dev", "build:meta": "node ./build/esbuild.js --dev --meta", "build:meta:prod": "node ./build/esbuild.js --meta", "build:prod": "node ./build/esbuild.js", @@ -41,4 +41,4 @@ "express": "^4.19.2", "node-fetch": "^2.7.0" } -} +} \ No newline at end of file diff --git a/it/typescript/src/app/app.ts b/it/typescript/src/app/app.ts index d724061b91..919dcfe915 100644 --- a/it/typescript/src/app/app.ts +++ b/it/typescript/src/app/app.ts @@ -3,7 +3,7 @@ import { Logger } from './common/logger'; import { DeviceCodeCredential } from '@azure/identity'; import { FetchRequestAdapter } from '@microsoft/kiota-http-fetchlibrary'; import { AzureIdentityAuthenticationProvider } from '@microsoft/kiota-authentication-azure'; -import { type ApiClient } from './client/apiClient'; +import { createApiClient } from './client/apiClient'; export class App { static run(): App { @@ -19,7 +19,7 @@ export class App { }); const authProvider = new AzureIdentityAuthenticationProvider(cred, ['Mail.Read']); const requestAdapter = new FetchRequestAdapter(authProvider); - const client = new ApiClient(requestAdapter); + const client = createApiClient(requestAdapter); Logger.log(`${client}`); return app; } diff --git a/it/typescript/src/app/client/apiClient.ts b/it/typescript/src/app/client/apiClient.ts new file mode 100644 index 0000000000..315953cf09 --- /dev/null +++ b/it/typescript/src/app/client/apiClient.ts @@ -0,0 +1,56 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { PlayRequestBuilderRequestsMetadata, type PlayRequestBuilder } from './play/'; +// @ts-ignore +import { apiClientProxifier, registerDefaultDeserializer, registerDefaultSerializer, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions'; +// @ts-ignore +import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form'; +// @ts-ignore +import { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json'; +// @ts-ignore +import { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart'; +// @ts-ignore +import { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text'; + +/** + * The main entry point of the SDK, exposes the configuration and the fluent API. + */ +export interface ApiClient extends BaseRequestBuilder { + /** + * The play property + */ + get play(): PlayRequestBuilder; +} +/** + * Instantiates a new {@link ApiClient} and sets the default values. + * @param requestAdapter The request adapter to use to execute the requests. + */ +export function createApiClient(requestAdapter: RequestAdapter) { + registerDefaultSerializer(JsonSerializationWriterFactory); + registerDefaultSerializer(TextSerializationWriterFactory); + registerDefaultSerializer(FormSerializationWriterFactory); + registerDefaultSerializer(MultipartSerializationWriterFactory); + registerDefaultDeserializer(JsonParseNodeFactory); + registerDefaultDeserializer(TextParseNodeFactory); + registerDefaultDeserializer(FormParseNodeFactory); + const pathParameters: Record = { + "baseurl": requestAdapter.baseUrl, + }; + return apiClientProxifier(requestAdapter, pathParameters, ApiClientNavigationMetadata, undefined); +} +/** + * Uri template for the request builder. + */ +export const ApiClientUriTemplate = "{+baseurl}"; +/** + * Metadata for all the navigation properties in the request builder. + */ +export const ApiClientNavigationMetadata: Record, NavigationMetadata> = { + play: { + requestsMetadata: PlayRequestBuilderRequestsMetadata, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/it/typescript/src/app/client/kiota-lock.json b/it/typescript/src/app/client/kiota-lock.json new file mode 100644 index 0000000000..cb884c395c --- /dev/null +++ b/it/typescript/src/app/client/kiota-lock.json @@ -0,0 +1,32 @@ +{ + "descriptionHash": "20EF99AD604AC7A78DCA5739B05E981E373C6EE21B6D1228B4236028E243FF16760BA2A652767B6D19080C0B4AFE03EA43AF77FCB2BEAB51087C1350A0F6647E", + "descriptionLocation": "../../../../openapi.yaml", + "lockFileVersion": "1.0.0", + "kiotaVersion": "1.13.0", + "clientClassName": "ApiClient", + "clientNamespaceName": "app.client", + "language": "TypeScript", + "usesBackingStore": false, + "excludeBackwardCompatible": true, + "includeAdditionalData": true, + "serializers": [ + "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", + "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" + ], + "deserializers": [ + "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", + "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", + "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" + ], + "structuredMimeTypes": [ + "application/json", + "text/plain;q=0.9", + "application/x-www-form-urlencoded;q=0.2", + "multipart/form-data;q=0.1" + ], + "includePatterns": [], + "excludePatterns": [], + "disabledValidationRules": [] +} \ No newline at end of file diff --git a/it/typescript/src/app/client/models/index.ts b/it/typescript/src/app/client/models/index.ts new file mode 100644 index 0000000000..a88aebfdec --- /dev/null +++ b/it/typescript/src/app/client/models/index.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota + +export type MoveType = (typeof MoveTypeObject)[keyof typeof MoveTypeObject]; +export const MoveTypeObject = { + ROCK: "ROCK", + PAPER: "PAPER", + SCISSORS: "SCISSORS", +} as const; +/* tslint:enable */ +/* eslint-enable */ diff --git a/it/typescript/src/app/client/play/index.ts b/it/typescript/src/app/client/play/index.ts new file mode 100644 index 0000000000..5692169f43 --- /dev/null +++ b/it/typescript/src/app/client/play/index.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +// Generated by Microsoft Kiota +// @ts-ignore +import { MoveType, MoveTypeObject } from '../models/'; +// @ts-ignore +import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; + +/** + * Builds and executes requests for operations under /play + */ +export interface PlayRequestBuilder extends BaseRequestBuilder { + /** + * Play a move + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {Promise} + */ + get(requestConfiguration?: RequestConfiguration | undefined) : Promise; + /** + * Play a move + * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. + * @returns {RequestInformation} + */ + toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; +} +/** + * Uri template for the request builder. + */ +export const PlayRequestBuilderUriTemplate = "{+baseurl}/play"; +/** + * Metadata for all the requests in the request builder. + */ +export const PlayRequestBuilderRequestsMetadata: RequestsMetadata = { + get: { + uriTemplate: PlayRequestBuilderUriTemplate, + responseBodyContentType: "application/json", + adapterMethodName: "sendEnum", + enumObject: MoveTypeObject, + }, +}; +/* tslint:enable */ +/* eslint-enable */ diff --git a/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs b/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs index 7a3d3aa436..c71a061a82 100644 --- a/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs +++ b/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs @@ -6,6 +6,7 @@ using Kiota.Builder.CodeDOM; using Kiota.Builder.Configuration; using Kiota.Builder.Extensions; +using Microsoft.Kiota.Http.HttpClientLibrary; namespace Kiota.Builder.Refiners; public class TypeScriptRefiner : CommonLanguageRefiner, ILanguageRefiner @@ -1103,9 +1104,30 @@ protected static void AddEnumObject(CodeElement currentElement) } CrawlTree(currentElement, AddEnumObject); } + protected static IEnumerable selectEnums(IEnumerable props) + { + return props.Select(static x => x.Type).OfType().Select(static x => x.TypeDefinition).OfType(); + } protected static void AddEnumObjectUsings(CodeElement currentElement) { + if (currentElement is CodeProperty codeProperty && codeProperty.Kind is CodePropertyKind.RequestBuilder && codeProperty.Type is CodeType codeType && codeType.TypeDefinition is CodeClass codeClass) + { + foreach (var propertyMethod in codeClass.Methods) + { + if (propertyMethod.ReturnType is CodeType ct && ct.TypeDefinition is CodeEnum codeEnum) + { + codeClass.AddUsing(new CodeUsing + { + Name = codeEnum.Name, + Declaration = new CodeType + { + TypeDefinition = codeEnum.CodeEnumObject + } + }); + } + } + } if (currentElement is CodeFunction codeFunction && codeFunction.OriginalLocalMethod.IsOfKind(CodeMethodKind.Deserializer, CodeMethodKind.Serializer)) { foreach (var propertyEnum in codeFunction.OriginalMethodParentClass.Properties.Select(static x => x.Type).OfType().Select(static x => x.TypeDefinition).OfType()) @@ -1120,7 +1142,7 @@ protected static void AddEnumObjectUsings(CodeElement currentElement) }); } } - CrawlTree(currentElement, AddEnumObjectUsings); + CrawlTree(currentElement!, AddEnumObjectUsings); } private static void ProcessModelClassProperties(CodeClass modelClass, CodeInterface modelInterface, IEnumerable properties, Func interfaceNamingCallback) diff --git a/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs b/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs index 70467c719c..c78bb77f6d 100644 --- a/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs +++ b/src/Kiota.Builder/Writers/TypeScript/CodeConstantWriter.cs @@ -119,7 +119,14 @@ private void WriteRequestsMetadataConstant(CodeConstant codeElement, LanguageWri } writer.WriteLine($"adapterMethodName: \"{GetSendRequestMethodName(isVoid, isStream, executorMethod.ReturnType.IsCollection, isPrimitive, isEnum)}\","); if (isEnum) - writer.WriteLine($"enumObject: {executorMethod.ReturnType.Name.ToFirstCharacterUpperCase()},"); + { + string enumObjectName = string.Empty; + if (executorMethod.ReturnType is CodeType ct && ct.TypeDefinition is CodeEnum ce) + { + enumObjectName = ce.CodeEnumObject!.Name; + } + writer.WriteLine($"enumObject: {enumObjectName!.ToFirstCharacterUpperCase()},"); + } else if (!isVoid) writer.WriteLine($"responseBodyFactory: {GetTypeFactory(isVoid, isStream, executorMethod, writer)},"); var sanitizedRequestBodyContentType = executorMethod.RequestBodyContentType.SanitizeDoubleQuote(); diff --git a/tests/Kiota.Builder.IntegrationTests/EnumHandling.yaml b/tests/Kiota.Builder.IntegrationTests/EnumHandling.yaml new file mode 100644 index 0000000000..43a6cb0eb2 --- /dev/null +++ b/tests/Kiota.Builder.IntegrationTests/EnumHandling.yaml @@ -0,0 +1,29 @@ +openapi: 3.0.3 +info: + title: Test + version: 3.0.x + description: Testing enum handling. + license: + name: Apache 2.0 + url: https://www.apache.org/licenses/LICENSE-2.0 +paths: + "/play": + get: + responses: + "200": + content: + application/json: + schema: + "$ref": "#/components/schemas/MoveType" + description: A move + description: "Play a move" +components: + schemas: + MoveType: + description: "" + enum: + - ROCK + - PAPER + - SCISSORS + type: string + example: ROCK diff --git a/tests/Kiota.Builder.IntegrationTests/GenerateSample.cs b/tests/Kiota.Builder.IntegrationTests/GenerateSample.cs index 7fba8971a5..e501197158 100644 --- a/tests/Kiota.Builder.IntegrationTests/GenerateSample.cs +++ b/tests/Kiota.Builder.IntegrationTests/GenerateSample.cs @@ -116,6 +116,28 @@ public async Task GeneratesErrorsInliningParents(GenerationLanguage language) }; await new KiotaBuilder(logger, configuration, _httpClient).GenerateClientAsync(new()); } + [InlineData(GenerationLanguage.CSharp)] + [InlineData(GenerationLanguage.Java)] + [InlineData(GenerationLanguage.Go)] + [InlineData(GenerationLanguage.Ruby)] + [InlineData(GenerationLanguage.Python)] + [InlineData(GenerationLanguage.TypeScript)] + [InlineData(GenerationLanguage.PHP)] + [Theory] + public async Task GeneratesCorrectEnums(GenerationLanguage language) + { + var logger = LoggerFactory.Create(builder => + { + }).CreateLogger(); + + var configuration = new GenerationConfiguration + { + Language = language, + OpenAPIFilePath = GetAbsolutePath("EnumHandling.yaml"), + OutputPath = $".\\Generated\\EnumHandling\\{language}", + }; + await new KiotaBuilder(logger, configuration, _httpClient).GenerateClientAsync(new()); + } [InlineData(GenerationLanguage.Java)] [Theory] public async Task GeneratesIdiomaticChildrenNames(GenerationLanguage language) diff --git a/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj b/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj index 5fa8150c95..490f14c266 100644 --- a/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj +++ b/tests/Kiota.Builder.IntegrationTests/Kiota.Builder.IntegrationTests.csproj @@ -49,6 +49,9 @@ PreserveNewest + + PreserveNewest + \ No newline at end of file From bb1c8f9e5bb7563e01b19583f93799ec4535c6aa Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 1 Apr 2024 13:37:55 +0100 Subject: [PATCH 05/32] test in CI --- .github/workflows/integration-tests.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index af6046f4b4..e85725a841 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,10 +1,11 @@ name: integration-tests on: - workflow_dispatch: push: - branches: [main] - pull_request: + # workflow_dispatch: + # push: + # branches: [main] + # pull_request: concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. From 0a5695a3c27d13756fd3ceb81b91f7a2ace2385a Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 1 Apr 2024 13:46:10 +0100 Subject: [PATCH 06/32] restore ci --- .github/workflows/integration-tests.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index e85725a841..af6046f4b4 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -1,11 +1,10 @@ name: integration-tests on: + workflow_dispatch: push: - # workflow_dispatch: - # push: - # branches: [main] - # pull_request: + branches: [main] + pull_request: concurrency: # Only run once for latest commit per ref and cancel other (previous) runs. From 9b9bf49d6fffd815ee724797e2304b3b10666c1a Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 1 Apr 2024 13:49:02 +0100 Subject: [PATCH 07/32] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ef449d8dd..24efe3bdb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added a warning message in the CLI when using preview languages. [#4316](https://github.com/microsoft/kiota/issues/4316) - Added support for handling untyped Json content in C#,Golang, TypeScript and Java. [#2319](https://github.com/microsoft/kiota/issues/2319) - Added TypeScript typecheck suppression to `.ts` files where unused imports cause build fail in projects which use `noUnusedLocals: true` compiler option. [#4397](https://github.com/microsoft/kiota/issues/4397) +- Fixed TypeScript generation bug when returning enums from endpoints. [#4426](https://github.com/microsoft/kiota/issues/4426) ### Changed From 4023461ee977e6e7aefc4031ceaa7600ad1df26d Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 1 Apr 2024 13:50:25 +0100 Subject: [PATCH 08/32] cleanup --- it/typescript/src/app/client/apiClient.ts | 56 -------------------- it/typescript/src/app/client/kiota-lock.json | 32 ----------- it/typescript/src/app/client/models/index.ts | 12 ----- it/typescript/src/app/client/play/index.ts | 42 --------------- 4 files changed, 142 deletions(-) delete mode 100644 it/typescript/src/app/client/apiClient.ts delete mode 100644 it/typescript/src/app/client/kiota-lock.json delete mode 100644 it/typescript/src/app/client/models/index.ts delete mode 100644 it/typescript/src/app/client/play/index.ts diff --git a/it/typescript/src/app/client/apiClient.ts b/it/typescript/src/app/client/apiClient.ts deleted file mode 100644 index 315953cf09..0000000000 --- a/it/typescript/src/app/client/apiClient.ts +++ /dev/null @@ -1,56 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// Generated by Microsoft Kiota -// @ts-ignore -import { PlayRequestBuilderRequestsMetadata, type PlayRequestBuilder } from './play/'; -// @ts-ignore -import { apiClientProxifier, registerDefaultDeserializer, registerDefaultSerializer, type BaseRequestBuilder, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestAdapter } from '@microsoft/kiota-abstractions'; -// @ts-ignore -import { FormParseNodeFactory, FormSerializationWriterFactory } from '@microsoft/kiota-serialization-form'; -// @ts-ignore -import { JsonParseNodeFactory, JsonSerializationWriterFactory } from '@microsoft/kiota-serialization-json'; -// @ts-ignore -import { MultipartSerializationWriterFactory } from '@microsoft/kiota-serialization-multipart'; -// @ts-ignore -import { TextParseNodeFactory, TextSerializationWriterFactory } from '@microsoft/kiota-serialization-text'; - -/** - * The main entry point of the SDK, exposes the configuration and the fluent API. - */ -export interface ApiClient extends BaseRequestBuilder { - /** - * The play property - */ - get play(): PlayRequestBuilder; -} -/** - * Instantiates a new {@link ApiClient} and sets the default values. - * @param requestAdapter The request adapter to use to execute the requests. - */ -export function createApiClient(requestAdapter: RequestAdapter) { - registerDefaultSerializer(JsonSerializationWriterFactory); - registerDefaultSerializer(TextSerializationWriterFactory); - registerDefaultSerializer(FormSerializationWriterFactory); - registerDefaultSerializer(MultipartSerializationWriterFactory); - registerDefaultDeserializer(JsonParseNodeFactory); - registerDefaultDeserializer(TextParseNodeFactory); - registerDefaultDeserializer(FormParseNodeFactory); - const pathParameters: Record = { - "baseurl": requestAdapter.baseUrl, - }; - return apiClientProxifier(requestAdapter, pathParameters, ApiClientNavigationMetadata, undefined); -} -/** - * Uri template for the request builder. - */ -export const ApiClientUriTemplate = "{+baseurl}"; -/** - * Metadata for all the navigation properties in the request builder. - */ -export const ApiClientNavigationMetadata: Record, NavigationMetadata> = { - play: { - requestsMetadata: PlayRequestBuilderRequestsMetadata, - }, -}; -/* tslint:enable */ -/* eslint-enable */ diff --git a/it/typescript/src/app/client/kiota-lock.json b/it/typescript/src/app/client/kiota-lock.json deleted file mode 100644 index cb884c395c..0000000000 --- a/it/typescript/src/app/client/kiota-lock.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "descriptionHash": "20EF99AD604AC7A78DCA5739B05E981E373C6EE21B6D1228B4236028E243FF16760BA2A652767B6D19080C0B4AFE03EA43AF77FCB2BEAB51087C1350A0F6647E", - "descriptionLocation": "../../../../openapi.yaml", - "lockFileVersion": "1.0.0", - "kiotaVersion": "1.13.0", - "clientClassName": "ApiClient", - "clientNamespaceName": "app.client", - "language": "TypeScript", - "usesBackingStore": false, - "excludeBackwardCompatible": true, - "includeAdditionalData": true, - "serializers": [ - "Microsoft.Kiota.Serialization.Json.JsonSerializationWriterFactory", - "Microsoft.Kiota.Serialization.Text.TextSerializationWriterFactory", - "Microsoft.Kiota.Serialization.Form.FormSerializationWriterFactory", - "Microsoft.Kiota.Serialization.Multipart.MultipartSerializationWriterFactory" - ], - "deserializers": [ - "Microsoft.Kiota.Serialization.Json.JsonParseNodeFactory", - "Microsoft.Kiota.Serialization.Text.TextParseNodeFactory", - "Microsoft.Kiota.Serialization.Form.FormParseNodeFactory" - ], - "structuredMimeTypes": [ - "application/json", - "text/plain;q=0.9", - "application/x-www-form-urlencoded;q=0.2", - "multipart/form-data;q=0.1" - ], - "includePatterns": [], - "excludePatterns": [], - "disabledValidationRules": [] -} \ No newline at end of file diff --git a/it/typescript/src/app/client/models/index.ts b/it/typescript/src/app/client/models/index.ts deleted file mode 100644 index a88aebfdec..0000000000 --- a/it/typescript/src/app/client/models/index.ts +++ /dev/null @@ -1,12 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// Generated by Microsoft Kiota - -export type MoveType = (typeof MoveTypeObject)[keyof typeof MoveTypeObject]; -export const MoveTypeObject = { - ROCK: "ROCK", - PAPER: "PAPER", - SCISSORS: "SCISSORS", -} as const; -/* tslint:enable */ -/* eslint-enable */ diff --git a/it/typescript/src/app/client/play/index.ts b/it/typescript/src/app/client/play/index.ts deleted file mode 100644 index 5692169f43..0000000000 --- a/it/typescript/src/app/client/play/index.ts +++ /dev/null @@ -1,42 +0,0 @@ -/* tslint:disable */ -/* eslint-disable */ -// Generated by Microsoft Kiota -// @ts-ignore -import { MoveType, MoveTypeObject } from '../models/'; -// @ts-ignore -import { type BaseRequestBuilder, type Parsable, type ParsableFactory, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions'; - -/** - * Builds and executes requests for operations under /play - */ -export interface PlayRequestBuilder extends BaseRequestBuilder { - /** - * Play a move - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns {Promise} - */ - get(requestConfiguration?: RequestConfiguration | undefined) : Promise; - /** - * Play a move - * @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options. - * @returns {RequestInformation} - */ - toGetRequestInformation(requestConfiguration?: RequestConfiguration | undefined) : RequestInformation; -} -/** - * Uri template for the request builder. - */ -export const PlayRequestBuilderUriTemplate = "{+baseurl}/play"; -/** - * Metadata for all the requests in the request builder. - */ -export const PlayRequestBuilderRequestsMetadata: RequestsMetadata = { - get: { - uriTemplate: PlayRequestBuilderUriTemplate, - responseBodyContentType: "application/json", - adapterMethodName: "sendEnum", - enumObject: MoveTypeObject, - }, -}; -/* tslint:enable */ -/* eslint-enable */ From 0fe1775e85e5d7031e1ecf4bc0015758d3b8cdb0 Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Mon, 1 Apr 2024 13:51:56 +0100 Subject: [PATCH 09/32] cleanup --- src/Kiota.Builder/Refiners/TypeScriptRefiner.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs b/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs index c71a061a82..fe32eb4938 100644 --- a/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs +++ b/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs @@ -6,7 +6,6 @@ using Kiota.Builder.CodeDOM; using Kiota.Builder.Configuration; using Kiota.Builder.Extensions; -using Microsoft.Kiota.Http.HttpClientLibrary; namespace Kiota.Builder.Refiners; public class TypeScriptRefiner : CommonLanguageRefiner, ILanguageRefiner @@ -1142,7 +1141,7 @@ protected static void AddEnumObjectUsings(CodeElement currentElement) }); } } - CrawlTree(currentElement!, AddEnumObjectUsings); + CrawlTree(currentElement, AddEnumObjectUsings); } private static void ProcessModelClassProperties(CodeClass modelClass, CodeInterface modelInterface, IEnumerable properties, Func interfaceNamingCallback) From 3857cd23e400f4fb661b1bb9188aceb06432b1c0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 05:50:10 +0000 Subject: [PATCH 10/32] Bump the kiota-dependencies group in /it/typescript with 6 updates Bumps the kiota-dependencies group in /it/typescript with 6 updates: | Package | From | To | | --- | --- | --- | | [@microsoft/kiota-abstractions](https://github.com/microsoft/kiota-typescript) | `1.0.0-preview.49` | `1.0.0-preview.50` | | [@microsoft/kiota-authentication-azure](https://github.com/microsoft/kiota-typescript) | `1.0.0-preview.44` | `1.0.0-preview.45` | | [@microsoft/kiota-http-fetchlibrary](https://github.com/microsoft/kiota-typescript) | `1.0.0-preview.48` | `1.0.0-preview.49` | | [@microsoft/kiota-serialization-form](https://github.com/microsoft/kiota-typescript) | `1.0.0-preview.38` | `1.0.0-preview.39` | | [@microsoft/kiota-serialization-json](https://github.com/microsoft/kiota-typescript) | `1.0.0-preview.49` | `1.0.0-preview.50` | | [@microsoft/kiota-serialization-text](https://github.com/microsoft-typescript/kiota) | `1.0.0-preview.46` | `1.0.0-preview.47` | Updates `@microsoft/kiota-abstractions` from 1.0.0-preview.49 to 1.0.0-preview.50 - [Release notes](https://github.com/microsoft/kiota-typescript/releases) - [Commits](https://github.com/microsoft/kiota-typescript/commits) Updates `@microsoft/kiota-authentication-azure` from 1.0.0-preview.44 to 1.0.0-preview.45 - [Release notes](https://github.com/microsoft/kiota-typescript/releases) - [Commits](https://github.com/microsoft/kiota-typescript/compare/@microsoft/kiota-authentication-azure@1.0.0-preview.44...@microsoft/kiota-abstractions@1.0.0-preview.45) Updates `@microsoft/kiota-http-fetchlibrary` from 1.0.0-preview.48 to 1.0.0-preview.49 - [Release notes](https://github.com/microsoft/kiota-typescript/releases) - [Commits](https://github.com/microsoft/kiota-typescript/compare/@microsoft/kiota-http-fetchlibrary@1.0.0-preview.48...@microsoft/kiota-abstractions@1.0.0-preview.49) Updates `@microsoft/kiota-serialization-form` from 1.0.0-preview.38 to 1.0.0-preview.39 - [Release notes](https://github.com/microsoft/kiota-typescript/releases) - [Commits](https://github.com/microsoft/kiota-typescript/compare/@microsoft/kiota-serialization-form@1.0.0-preview.38...@microsoft/kiota-abstractions@1.0.0-preview.39) Updates `@microsoft/kiota-serialization-json` from 1.0.0-preview.49 to 1.0.0-preview.50 - [Release notes](https://github.com/microsoft/kiota-typescript/releases) - [Commits](https://github.com/microsoft/kiota-typescript/commits) Updates `@microsoft/kiota-serialization-text` from 1.0.0-preview.46 to 1.0.0-preview.47 - [Commits](https://github.com/microsoft-typescript/kiota/commits) --- updated-dependencies: - dependency-name: "@microsoft/kiota-abstractions" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: "@microsoft/kiota-authentication-azure" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: "@microsoft/kiota-http-fetchlibrary" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: "@microsoft/kiota-serialization-form" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: "@microsoft/kiota-serialization-json" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: "@microsoft/kiota-serialization-text" dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 58 ++++++++++++++++----------------- it/typescript/package.json | 12 +++---- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 869fc3e7d5..0fb405451d 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -10,13 +10,13 @@ "license": "MIT", "dependencies": { "@azure/identity": "^4.0.1", - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", - "@microsoft/kiota-authentication-azure": "^1.0.0-preview.44", - "@microsoft/kiota-http-fetchlibrary": "^1.0.0-preview.48", - "@microsoft/kiota-serialization-form": "^1.0.0-preview.38", - "@microsoft/kiota-serialization-json": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", + "@microsoft/kiota-authentication-azure": "^1.0.0-preview.45", + "@microsoft/kiota-http-fetchlibrary": "^1.0.0-preview.49", + "@microsoft/kiota-serialization-form": "^1.0.0-preview.39", + "@microsoft/kiota-serialization-json": "^1.0.0-preview.50", "@microsoft/kiota-serialization-multipart": "^1.0.0-preview.28", - "@microsoft/kiota-serialization-text": "^1.0.0-preview.46", + "@microsoft/kiota-serialization-text": "^1.0.0-preview.47", "express": "^4.19.2", "node-fetch": "^2.7.0" }, @@ -678,9 +678,9 @@ "dev": true }, "node_modules/@microsoft/kiota-abstractions": { - "version": "1.0.0-preview.49", - "resolved": "https://registry.npmjs.org/@microsoft/kiota-abstractions/-/kiota-abstractions-1.0.0-preview.49.tgz", - "integrity": "sha512-QBn+fG/48fV6AFJAa9bWNp+MdIgklUJ6wUTCO3RqLup9M8RamGuK0B57jCsqfd3ZTgK/xQRacpwTdoPy0xU8Vw==", + "version": "1.0.0-preview.50", + "resolved": "https://registry.npmjs.org/@microsoft/kiota-abstractions/-/kiota-abstractions-1.0.0-preview.50.tgz", + "integrity": "sha512-h30NZ/oPsPhIT+rmAmN2otMg06HgXzIYaJ568cl4MKuBdtKSNFjMnwcj+ed4NiiFZqNW5O6KwzTrkW260TrLIA==", "dependencies": { "@opentelemetry/api": "^1.7.0", "@std-uritemplate/std-uritemplate": "^0.0.55", @@ -703,43 +703,43 @@ } }, "node_modules/@microsoft/kiota-authentication-azure": { - "version": "1.0.0-preview.44", - "resolved": "https://registry.npmjs.org/@microsoft/kiota-authentication-azure/-/kiota-authentication-azure-1.0.0-preview.44.tgz", - "integrity": "sha512-7TW6o3dwEGEPXv7q70OO5P1Ywl0ddowOUFov+MH+I5CE6k/tIxU7Bh+QwKcn7PmXKQdDLUKVMts/xwLZ9JPBEQ==", + "version": "1.0.0-preview.45", + "resolved": "https://registry.npmjs.org/@microsoft/kiota-authentication-azure/-/kiota-authentication-azure-1.0.0-preview.45.tgz", + "integrity": "sha512-mIPZ5q3CK3frSLBJXjlnOBKqm5mNgxqB878Zjfec8mKL05kqw8BPQtR/nzy+Lb952+gFts+MJAeoy6erBdATAw==", "dependencies": { "@azure/core-auth": "^1.5.0", - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", "@opentelemetry/api": "^1.7.0", "tslib": "^2.6.2" } }, "node_modules/@microsoft/kiota-http-fetchlibrary": { - "version": "1.0.0-preview.48", - "resolved": "https://registry.npmjs.org/@microsoft/kiota-http-fetchlibrary/-/kiota-http-fetchlibrary-1.0.0-preview.48.tgz", - "integrity": "sha512-SSxaTDFIAmG/JwqJaQmbjfSlLXQUA9/PZfMhvyPmAd1y9QOpxMvd2xMxRpzB8W5foE1NIkihID6dTEGAeK2dZw==", + "version": "1.0.0-preview.49", + "resolved": "https://registry.npmjs.org/@microsoft/kiota-http-fetchlibrary/-/kiota-http-fetchlibrary-1.0.0-preview.49.tgz", + "integrity": "sha512-VMmks/fdDuARSSrSPeLsXAL07o//62YkrbwvIu4IA8elx+uwBrNmgGPVY/jk8FoSly8aW2ExlJxqch7EWwjXeQ==", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", "@opentelemetry/api": "^1.7.0", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" } }, "node_modules/@microsoft/kiota-serialization-form": { - "version": "1.0.0-preview.38", - "resolved": "https://registry.npmjs.org/@microsoft/kiota-serialization-form/-/kiota-serialization-form-1.0.0-preview.38.tgz", - "integrity": "sha512-lRYSVsG7m2cFUu5YvzUA2qjjUiO0ykfBH7vJWl3oRx65e4BYFQqtBqlnhcK9941rvHdBmyaAz3WTvzNQgjHZuw==", + "version": "1.0.0-preview.39", + "resolved": "https://registry.npmjs.org/@microsoft/kiota-serialization-form/-/kiota-serialization-form-1.0.0-preview.39.tgz", + "integrity": "sha512-R7ZR0aMOuRCqefelRRzMTzLVhx7A4AynDkftEn2qunag7ouVpp6kG/PSRy9TSQjTwyZynCaVChSFWsRbc3LRQA==", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" } }, "node_modules/@microsoft/kiota-serialization-json": { - "version": "1.0.0-preview.49", - "resolved": "https://registry.npmjs.org/@microsoft/kiota-serialization-json/-/kiota-serialization-json-1.0.0-preview.49.tgz", - "integrity": "sha512-DKXwlmiNOZKTChqRRgJeEbXc1ilHuz0T0LkirTeYjOQb1cPJkYkHieJ1rxHAPH6J1QU1hnvOjuac/3bJtmg8dg==", + "version": "1.0.0-preview.50", + "resolved": "https://registry.npmjs.org/@microsoft/kiota-serialization-json/-/kiota-serialization-json-1.0.0-preview.50.tgz", + "integrity": "sha512-IdhUVK3wH/3zgbTeg8xgd6RZncFQzkE1xqP0bCNEowg+OkXToxvrXi4b/u5t1VMHZNL+9SI/qH32x00GZhHK7Q==", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" } @@ -755,11 +755,11 @@ } }, "node_modules/@microsoft/kiota-serialization-text": { - "version": "1.0.0-preview.46", - "resolved": "https://registry.npmjs.org/@microsoft/kiota-serialization-text/-/kiota-serialization-text-1.0.0-preview.46.tgz", - "integrity": "sha512-ljkXiCpUw4D1cvC6GaEDnlUKDvmXNB7sxY5pCSF1IOBcABgzLc0MgUekTHob0OPN7Br94CywlKiHYlQAfmACkQ==", + "version": "1.0.0-preview.47", + "resolved": "https://registry.npmjs.org/@microsoft/kiota-serialization-text/-/kiota-serialization-text-1.0.0-preview.47.tgz", + "integrity": "sha512-AxNilSn86m5LB/Z1s89WFD+QZFq+ySgIHX1RtwfPzOMbKglEECpMUMDMqRPRpkKpA6jd/BPJ74dAap92PTurBQ==", "dependencies": { - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", "guid-typescript": "^1.0.9", "tslib": "^2.6.2" } diff --git a/it/typescript/package.json b/it/typescript/package.json index 255849aaba..4d0acf7e34 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -31,13 +31,13 @@ }, "dependencies": { "@azure/identity": "^4.0.1", - "@microsoft/kiota-abstractions": "^1.0.0-preview.49", - "@microsoft/kiota-authentication-azure": "^1.0.0-preview.44", - "@microsoft/kiota-http-fetchlibrary": "^1.0.0-preview.48", - "@microsoft/kiota-serialization-form": "^1.0.0-preview.38", - "@microsoft/kiota-serialization-json": "^1.0.0-preview.49", + "@microsoft/kiota-abstractions": "^1.0.0-preview.50", + "@microsoft/kiota-authentication-azure": "^1.0.0-preview.45", + "@microsoft/kiota-http-fetchlibrary": "^1.0.0-preview.49", + "@microsoft/kiota-serialization-form": "^1.0.0-preview.39", + "@microsoft/kiota-serialization-json": "^1.0.0-preview.50", "@microsoft/kiota-serialization-multipart": "^1.0.0-preview.28", - "@microsoft/kiota-serialization-text": "^1.0.0-preview.46", + "@microsoft/kiota-serialization-text": "^1.0.0-preview.47", "express": "^4.19.2", "node-fetch": "^2.7.0" } From 213237812fa74f2704253834cd0f5ff2f838ae99 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 05:55:40 +0000 Subject: [PATCH 11/32] Bump @types/node from 20.11.30 to 20.12.2 in /it/typescript Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.11.30 to 20.12.2. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 8 ++++---- it/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 0fb405451d..831add2a45 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.11.30", + "@types/node": "^20.12.2", "@typescript-eslint/eslint-plugin": "^7.4.0", "@typescript-eslint/parser": "^7.4.0", "esbuild": "^0.20.2", @@ -827,9 +827,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.11.30", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.30.tgz", - "integrity": "sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw==", + "version": "20.12.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", + "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", "dev": true, "dependencies": { "undici-types": "~5.26.4" diff --git a/it/typescript/package.json b/it/typescript/package.json index 4d0acf7e34..1bde412382 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -19,7 +19,7 @@ "prettier": "./.prettierrc.json", "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.11.30", + "@types/node": "^20.12.2", "@typescript-eslint/eslint-plugin": "^7.4.0", "@typescript-eslint/parser": "^7.4.0", "esbuild": "^0.20.2", From baa83188285ba118810341dfa633aedc83508617 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:18:34 +0000 Subject: [PATCH 12/32] Bump @typescript-eslint/parser from 7.4.0 to 7.5.0 in /it/typescript Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.4.0 to 7.5.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.5.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 115 +++++++++++++++++++++++++++++--- it/typescript/package.json | 2 +- 2 files changed, 108 insertions(+), 9 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 831add2a45..f0fe8d3ecd 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -24,7 +24,7 @@ "@es-exec/esbuild-plugin-start": "^0.0.5", "@types/node": "^20.12.2", "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", @@ -877,15 +877,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.4.0.tgz", - "integrity": "sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/typescript-estree": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4" }, "engines": { @@ -904,6 +904,105 @@ } } }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz", + "integrity": "sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", + "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", + "dev": true, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", + "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", + "debug": "^4.3.4", + "globby": "^11.1.0", + "is-glob": "^4.0.3", + "minimatch": "9.0.3", + "semver": "^7.5.4", + "ts-api-utils": "^1.0.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, + "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", + "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", + "dev": true, + "dependencies": { + "@typescript-eslint/types": "7.5.0", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^18.18.0 || >=20.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/@typescript-eslint/parser/node_modules/minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/@typescript-eslint/scope-manager": { "version": "7.4.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz", diff --git a/it/typescript/package.json b/it/typescript/package.json index 1bde412382..00bc5dba2f 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -21,7 +21,7 @@ "@es-exec/esbuild-plugin-start": "^0.0.5", "@types/node": "^20.12.2", "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", From dfeb6d8f08f0fbbe0691c12430ad26e4a0258249 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:28:41 +0000 Subject: [PATCH 13/32] Bump @typescript-eslint/eslint-plugin in /it/typescript Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 7.4.0 to 7.5.0. - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.5.0/packages/eslint-plugin) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 163 +++++++------------------------- it/typescript/package.json | 2 +- 2 files changed, 33 insertions(+), 132 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index f0fe8d3ecd..fe98178ec4 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -23,7 +23,7 @@ "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", "@types/node": "^20.12.2", - "@typescript-eslint/eslint-plugin": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", @@ -842,16 +842,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.4.0.tgz", - "integrity": "sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz", + "integrity": "sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/type-utils": "7.4.0", - "@typescript-eslint/utils": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/type-utils": "7.5.0", + "@typescript-eslint/utils": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -904,7 +904,7 @@ } } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": { + "node_modules/@typescript-eslint/scope-manager": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz", "integrity": "sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==", @@ -921,113 +921,14 @@ "url": "https://opencollective.com/typescript-eslint" } }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", - "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", - "dev": true, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", - "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.5.0", - "@typescript-eslint/visitor-keys": "7.5.0", - "debug": "^4.3.4", - "globby": "^11.1.0", - "is-glob": "^4.0.3", - "minimatch": "9.0.3", - "semver": "^7.5.4", - "ts-api-utils": "^1.0.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", - "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.5.0", - "eslint-visitor-keys": "^3.4.1" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/@typescript-eslint/parser/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/@typescript-eslint/scope-manager": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz", - "integrity": "sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==", - "dev": true, - "dependencies": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0" - }, - "engines": { - "node": "^18.18.0 || >=20.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/typescript-eslint" - } - }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.4.0.tgz", - "integrity": "sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz", + "integrity": "sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.4.0", - "@typescript-eslint/utils": "7.4.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/utils": "7.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -1048,9 +949,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.4.0.tgz", - "integrity": "sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", + "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -1061,13 +962,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.4.0.tgz", - "integrity": "sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", + "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -1113,17 +1014,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.4.0.tgz", - "integrity": "sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.5.0.tgz", + "integrity": "sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/typescript-estree": "7.4.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", "semver": "^7.5.4" }, "engines": { @@ -1138,12 +1039,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.4.0.tgz", - "integrity": "sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", + "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/types": "7.5.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/it/typescript/package.json b/it/typescript/package.json index 00bc5dba2f..1ca63871a8 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -20,7 +20,7 @@ "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", "@types/node": "^20.12.2", - "@typescript-eslint/eslint-plugin": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", "eslint": "^8.57.0", From aef1a5d5790307b0c03be289ce470c3ce8545b5b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 08:50:00 +0000 Subject: [PATCH 14/32] Bump the eslint group in /vscode/microsoft-kiota with 2 updates Bumps the eslint group in /vscode/microsoft-kiota with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 7.4.0 to 7.5.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.5.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 7.4.0 to 7.5.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.5.0/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: eslint ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 88 ++++++++++++------------ vscode/microsoft-kiota/package.json | 4 +- 2 files changed, 46 insertions(+), 46 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index 54864b85c7..a1cc7bfe39 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -20,8 +20,8 @@ "@types/mocha": "^10.0.6", "@types/node": "20.x", "@types/vscode": "^1.87.0", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", "@vscode/test-electron": "^2.3.9", "eslint": "^8.57.0", "glob": "^10.3.12", @@ -513,16 +513,16 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.4.0.tgz", - "integrity": "sha512-yHMQ/oFaM7HZdVrVm/M2WHaNPgyuJH4WelkSVEWSSsir34kxW2kDJCxlXRhhGWEsMN0WAW/vLpKfKVcm8k+MPw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-7.5.0.tgz", + "integrity": "sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==", "dev": true, "dependencies": { "@eslint-community/regexpp": "^4.5.1", - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/type-utils": "7.4.0", - "@typescript-eslint/utils": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/type-utils": "7.5.0", + "@typescript-eslint/utils": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4", "graphemer": "^1.4.0", "ignore": "^5.2.4", @@ -548,15 +548,15 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.4.0.tgz", - "integrity": "sha512-ZvKHxHLusweEUVwrGRXXUVzFgnWhigo4JurEj0dGF1tbcGh6buL+ejDdjxOQxv6ytcY1uhun1p2sm8iWStlgLQ==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-7.5.0.tgz", + "integrity": "sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/typescript-estree": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4" }, "engines": { @@ -576,13 +576,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.4.0.tgz", - "integrity": "sha512-68VqENG5HK27ypafqLVs8qO+RkNc7TezCduYrx8YJpXq2QGZ30vmNZGJJJC48+MVn4G2dCV8m5ZTVnzRexTVtw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-7.5.0.tgz", + "integrity": "sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0" + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0" }, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -593,13 +593,13 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.4.0.tgz", - "integrity": "sha512-247ETeHgr9WTRMqHbbQdzwzhuyaJ8dPTuyuUEMANqzMRB1rj/9qFIuIXK7l0FX9i9FXbHeBQl/4uz6mYuCE7Aw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-7.5.0.tgz", + "integrity": "sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "7.4.0", - "@typescript-eslint/utils": "7.4.0", + "@typescript-eslint/typescript-estree": "7.5.0", + "@typescript-eslint/utils": "7.5.0", "debug": "^4.3.4", "ts-api-utils": "^1.0.1" }, @@ -620,9 +620,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.4.0.tgz", - "integrity": "sha512-mjQopsbffzJskos5B4HmbsadSJQWaRK0UxqQ7GuNA9Ga4bEKeiO6b2DnB6cM6bpc8lemaPseh0H9B/wyg+J7rw==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-7.5.0.tgz", + "integrity": "sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==", "dev": true, "engines": { "node": "^18.18.0 || >=20.0.0" @@ -633,13 +633,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.4.0.tgz", - "integrity": "sha512-A99j5AYoME/UBQ1ucEbbMEmGkN7SE0BvZFreSnTd1luq7yulcHdyGamZKizU7canpGDWGJ+Q6ZA9SyQobipePg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-7.5.0.tgz", + "integrity": "sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/visitor-keys": "7.4.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/visitor-keys": "7.5.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -685,17 +685,17 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.4.0.tgz", - "integrity": "sha512-NQt9QLM4Tt8qrlBVY9lkMYzfYtNz8/6qwZg8pI3cMGlPnj6mOpRxxAm7BMJN9K0AiY+1BwJ5lVC650YJqYOuNg==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-7.5.0.tgz", + "integrity": "sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", "@types/json-schema": "^7.0.12", "@types/semver": "^7.5.0", - "@typescript-eslint/scope-manager": "7.4.0", - "@typescript-eslint/types": "7.4.0", - "@typescript-eslint/typescript-estree": "7.4.0", + "@typescript-eslint/scope-manager": "7.5.0", + "@typescript-eslint/types": "7.5.0", + "@typescript-eslint/typescript-estree": "7.5.0", "semver": "^7.5.4" }, "engines": { @@ -710,12 +710,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.4.0.tgz", - "integrity": "sha512-0zkC7YM0iX5Y41homUUeW1CHtZR01K3ybjM1l6QczoMuay0XKtrb93kv95AxUGwdjGr64nNqnOCwmEl616N8CA==", + "version": "7.5.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-7.5.0.tgz", + "integrity": "sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "7.4.0", + "@typescript-eslint/types": "7.5.0", "eslint-visitor-keys": "^3.4.1" }, "engines": { diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index 258149a578..6660f892e7 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -427,8 +427,8 @@ "@types/mocha": "^10.0.6", "@types/node": "20.x", "@types/vscode": "^1.87.0", - "@typescript-eslint/eslint-plugin": "^7.4.0", - "@typescript-eslint/parser": "^7.4.0", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", "@vscode/test-electron": "^2.3.9", "eslint": "^8.57.0", "glob": "^10.3.12", From 676f1923b045104a228eda4f10a3634878279c8e Mon Sep 17 00:00:00 2001 From: Andrea Peruffo Date: Tue, 2 Apr 2024 10:05:22 +0100 Subject: [PATCH 15/32] remove unused code --- src/Kiota.Builder/Refiners/TypeScriptRefiner.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs b/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs index fe32eb4938..6ef8b678b6 100644 --- a/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs +++ b/src/Kiota.Builder/Refiners/TypeScriptRefiner.cs @@ -1103,11 +1103,6 @@ protected static void AddEnumObject(CodeElement currentElement) } CrawlTree(currentElement, AddEnumObject); } - protected static IEnumerable selectEnums(IEnumerable props) - { - return props.Select(static x => x.Type).OfType().Select(static x => x.TypeDefinition).OfType(); - } - protected static void AddEnumObjectUsings(CodeElement currentElement) { if (currentElement is CodeProperty codeProperty && codeProperty.Kind is CodePropertyKind.RequestBuilder && codeProperty.Type is CodeType codeType && codeType.TypeDefinition is CodeClass codeClass) From e7a11ee18fbd0c07dc32c48bdd94cbbc64e3c103 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 08:26:49 +0000 Subject: [PATCH 16/32] Bump @types/node from 20.12.2 to 20.12.3 in /it/typescript Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.2 to 20.12.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 8 ++++---- it/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index fe98178ec4..744d113baf 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.12.2", + "@types/node": "^20.12.3", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", @@ -827,9 +827,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", - "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", + "version": "20.12.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.3.tgz", + "integrity": "sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" diff --git a/it/typescript/package.json b/it/typescript/package.json index 1ca63871a8..00b45f9a04 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -19,7 +19,7 @@ "prettier": "./.prettierrc.json", "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.12.2", + "@types/node": "^20.12.3", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", From 55c4954b2f5ef75016943d6424477ff5b56af3b1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 08:26:55 +0000 Subject: [PATCH 17/32] Bump @types/node from 20.12.2 to 20.12.3 in /vscode/microsoft-kiota Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.2 to 20.12.3. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index a1cc7bfe39..d3e1dc04a1 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -492,9 +492,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.2.tgz", - "integrity": "sha512-zQ0NYO87hyN6Xrclcqp7f8ZbXNbRfoGWNcMvHTPQp9UUrwI0mI7XBz+cu7/W6/VClYo2g63B0cjull/srU7LgQ==", + "version": "20.12.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.3.tgz", + "integrity": "sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" From b157600c620bce9e86a6339f2b5e240ceea852a3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:16:56 +0000 Subject: [PATCH 18/32] Bump the kiota-dependencies group in /it/java with 5 updates Bumps the kiota-dependencies group in /it/java with 5 updates: | Package | From | To | | --- | --- | --- | | [com.microsoft.kiota:microsoft-kiota-abstractions](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-json](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-text](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-form](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-multipart](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-json](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-text](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-form](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | | [com.microsoft.kiota:microsoft-kiota-serialization-multipart](https://github.com/microsoft/kiota-java) | `1.1.2` | `1.1.3` | Updates `com.microsoft.kiota:microsoft-kiota-abstractions` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-json` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-text` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-form` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-multipart` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-json` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-text` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-form` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) Updates `com.microsoft.kiota:microsoft-kiota-serialization-multipart` from 1.1.2 to 1.1.3 - [Release notes](https://github.com/microsoft/kiota-java/releases) - [Changelog](https://github.com/microsoft/kiota-java/blob/main/CHANGELOG.md) - [Commits](https://github.com/microsoft/kiota-java/compare/v1.1.2...v1.1.3) --- updated-dependencies: - dependency-name: com.microsoft.kiota:microsoft-kiota-abstractions dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-text dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-form dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-multipart dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-json dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-text dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-form dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies - dependency-name: com.microsoft.kiota:microsoft-kiota-serialization-multipart dependency-type: direct:production update-type: version-update:semver-patch dependency-group: kiota-dependencies ... Signed-off-by: dependabot[bot] --- it/java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/java/pom.xml b/it/java/pom.xml index c6079f3c55..6ff2f8edf9 100644 --- a/it/java/pom.xml +++ b/it/java/pom.xml @@ -15,7 +15,7 @@ UTF-8 UTF-8 - 1.1.2 + 1.1.3 From de8ce6825d317c653fab5181a69a6262828fd8d2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:36:16 +0000 Subject: [PATCH 19/32] Bump @types/node from 20.12.3 to 20.12.4 in /vscode/microsoft-kiota Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.3 to 20.12.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index d3e1dc04a1..f819afb1da 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -492,9 +492,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.3.tgz", - "integrity": "sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==", + "version": "20.12.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.4.tgz", + "integrity": "sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" From 503b325e7d0a2c5e1bcd3a7ca5db1c76e8b8e3b2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 08:45:45 +0000 Subject: [PATCH 20/32] Bump @types/node from 20.12.3 to 20.12.4 in /it/typescript Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.3 to 20.12.4. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 8 ++++---- it/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 744d113baf..47fb776091 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.12.3", + "@types/node": "^20.12.4", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", @@ -827,9 +827,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.3.tgz", - "integrity": "sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==", + "version": "20.12.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.4.tgz", + "integrity": "sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" diff --git a/it/typescript/package.json b/it/typescript/package.json index e4e98c2856..4440393d26 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -19,7 +19,7 @@ "prettier": "./.prettierrc.json", "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.12.3", + "@types/node": "^20.12.4", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", From c5a5e796c97e90735eab69fab79cdb0ab817cf08 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 4 Apr 2024 12:16:10 +0300 Subject: [PATCH 21/32] Bumps version for release 1.13.0 --- CHANGELOG.md | 2 + src/kiota/appsettings.json | 82 +++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 41 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 24efe3bdb7..252974848e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.13.0] - 2024-04-04 + ### Added - Added a warning message in the CLI when using preview languages. [#4316](https://github.com/microsoft/kiota/issues/4316) diff --git a/src/kiota/appsettings.json b/src/kiota/appsettings.json index d4b156635a..2f8cc3845c 100644 --- a/src/kiota/appsettings.json +++ b/src/kiota/appsettings.json @@ -27,31 +27,31 @@ "Dependencies": [ { "Name": "Microsoft.Kiota.Abstractions", - "Version": "1.7.3" + "Version": "1.8.1" }, { "Name": "Microsoft.Kiota.Http.HttpClientLibrary", - "Version": "1.3.3" + "Version": "1.3.8" }, { "Name": "Microsoft.Kiota.Serialization.Form", - "Version": "1.1.1" + "Version": "1.1.5" }, { "Name": "Microsoft.Kiota.Serialization.Json", - "Version": "1.1.2" + "Version": "1.2.0" }, { "Name": "Microsoft.Kiota.Authentication.Azure", - "Version": "1.1.2" + "Version": "1.1.4" }, { "Name": "Microsoft.Kiota.Serialization.Text", - "Version": "1.1.1" + "Version": "1.1.4" }, { "Name": "Microsoft.Kiota.Serialization.Multipart", - "Version": "1.1.1" + "Version": "1.1.3" } ], "DependencyInstallCommand": "dotnet add package {0} --version {1}" @@ -61,31 +61,31 @@ "Dependencies": [ { "Name": "com.microsoft.kiota:microsoft-kiota-abstractions", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "com.microsoft.kiota:microsoft-kiota-http-okHttp", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "com.microsoft.kiota:microsoft-kiota-serialization-form", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "com.microsoft.kiota:microsoft-kiota-serialization-json", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "com.microsoft.kiota:microsoft-kiota-authentication-azure", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "com.microsoft.kiota:microsoft-kiota-serialization-text", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "com.microsoft.kiota:microsoft-kiota-serialization-multipart", - "Version": "0.11.0" + "Version": "1.1.3" }, { "Name": "jakarta.annotation:jakarta.annotation-api", @@ -99,11 +99,11 @@ "Dependencies": [ { "Name": "github.com/microsoft/kiota-abstractions-go", - "Version": "v1.5.3" + "Version": "v1.6.0" }, { "Name": "github.com/microsoft/kiota-http-go", - "Version": "v1.1.1" + "Version": "v1.3.3" }, { "Name": "github.com/microsoft/kiota-serialization-form-go", @@ -111,11 +111,11 @@ }, { "Name": "github.com/microsoft/kiota-serialization-json-go", - "Version": "v1.0.4" + "Version": "v1.0.7" }, { "Name": "github.com/microsoft/kiota-authentication-azure-go", - "Version": "v1.0.1" + "Version": "v1.0.2" }, { "Name": "github.com/microsoft/kiota-serialization-text-go", @@ -133,31 +133,31 @@ "Dependencies": [ { "Name": "@microsoft/kiota-abstractions", - "Version": "1.0.0-preview.35" + "Version": "1.0.0-preview.50" }, { "Name": "@microsoft/kiota-http-fetchlibrary", - "Version": "1.0.0-preview.34" + "Version": "1.0.0-preview.49" }, { "Name": "@microsoft/kiota-serialization-form", - "Version": "1.0.0-preview.24" + "Version": "1.0.0-preview.39" }, { "Name": "@microsoft/kiota-serialization-json", - "Version": "1.0.0-preview.35" + "Version": "1.0.0-preview.50" }, { "Name": "@microsoft/kiota-authentication-azure", - "Version": "1.0.0-preview.30" + "Version": "1.0.0-preview.45" }, { "Name": "@microsoft/kiota-serialization-text", - "Version": "1.0.0-preview.32" + "Version": "1.0.0-preview.47" }, { "Name": "@microsoft/kiota-serialization-multipart", - "Version": "1.0.0-preview.14" + "Version": "1.0.0-preview.28" } ], "DependencyInstallCommand": "npm install {0}@{1} -SE" @@ -167,19 +167,19 @@ "Dependencies": [ { "Name": "microsoft/kiota-abstractions", - "Version": "1.0.2" + "Version": "1.2.0" }, { "Name": "microsoft/kiota-http-guzzle", - "Version": "1.1.0" + "Version": "1.3.0" }, { "Name": "microsoft/kiota-serialization-json", - "Version": "1.0.1" + "Version": "1.1.0" }, { "Name": "microsoft/kiota-authentication-phpleague", - "Version": "1.0.1" + "Version": "1.1.0" }, { "Name": "microsoft/kiota-serialization-text", @@ -193,15 +193,15 @@ "Dependencies": [ { "Name": "microsoft-kiota-abstractions", - "Version": "1.0.0" + "Version": "1.3.2" }, { "Name": "microsoft-kiota-http", - "Version": "1.2.0" + "Version": "1.3.1" }, { "Name": "microsoft-kiota-serialization-json", - "Version": "1.0.0" + "Version": "1.1.0" }, { "Name": "microsoft-kiota-authentication-azure", @@ -227,11 +227,11 @@ "Dependencies": [ { "Name": "microsoft_kiota_abstractions", - "Version": "0.14.3" + "Version": "0.14.4" }, { "Name": "microsoft_kiota_faraday", - "Version": "0.12.0" + "Version": "0.15.0" }, { "Name": "microsoft_kiota_serialization_json", @@ -254,31 +254,31 @@ "Dependencies": [ { "Name": "Microsoft.Kiota.Abstractions", - "Version": "1.7.3" + "Version": "1.8.1" }, { "Name": "Microsoft.Kiota.Http.HttpClientLibrary", - "Version": "1.3.3" + "Version": "1.3.8" }, { "Name": "Microsoft.Kiota.Serialization.Form", - "Version": "1.1.1" + "Version": "1.1.5" }, { "Name": "Microsoft.Kiota.Serialization.Json", - "Version": "1.1.2" + "Version": "1.2.0" }, { "Name": "Microsoft.Kiota.Authentication.Azure", - "Version": "1.1.2" + "Version": "1.1.4" }, { "Name": "Microsoft.Kiota.Serialization.Text", - "Version": "1.1.1" + "Version": "1.1.4" }, { "Name": "Microsoft.Kiota.Cli.Commons", - "Version": "1.0.0" + "Version": "1.1.0" } ], "DependencyInstallCommand": "dotnet add package {0} --version {1}" From 6e59ac093e8bc97096a7b72766961dfb1c90f90f Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Thu, 4 Apr 2024 15:43:48 +0300 Subject: [PATCH 22/32] - bumps version for release of --- src/Kiota.Builder/Kiota.Builder.csproj | 2 +- src/kiota/kiota.csproj | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Kiota.Builder/Kiota.Builder.csproj b/src/Kiota.Builder/Kiota.Builder.csproj index 5fec13e9b1..531683f584 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.13.0 + 1.14.0 $(VersionSuffix) https://github.com/microsoft/kiota/releases diff --git a/src/kiota/kiota.csproj b/src/kiota/kiota.csproj index 025a76fa17..bd261b9694 100644 --- a/src/kiota/kiota.csproj +++ b/src/kiota/kiota.csproj @@ -15,7 +15,7 @@ Microsoft.OpenApi.Kiota Microsoft.OpenApi.Kiota ./nupkg - 1.13.0 + 1.14.0 $(VersionSuffix) https://github.com/microsoft/kiota/releases @@ -41,8 +41,7 @@ - + @@ -52,8 +51,7 @@ - + @@ -63,4 +61,4 @@ PreserveNewest - \ No newline at end of file + From ad787436255c4111a5406c0001b959304fa89f34 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 08:24:24 +0000 Subject: [PATCH 23/32] Bump @types/vscode from 1.87.0 to 1.88.0 in /vscode/microsoft-kiota Bumps [@types/vscode](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/vscode) from 1.87.0 to 1.88.0. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/vscode) --- updated-dependencies: - dependency-name: "@types/vscode" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 8 ++++---- vscode/microsoft-kiota/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index f819afb1da..601a14c4ac 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -19,7 +19,7 @@ "@types/adm-zip": "^0.5.5", "@types/mocha": "^10.0.6", "@types/node": "20.x", - "@types/vscode": "^1.87.0", + "@types/vscode": "^1.88.0", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "@vscode/test-electron": "^2.3.9", @@ -507,9 +507,9 @@ "dev": true }, "node_modules/@types/vscode": { - "version": "1.87.0", - "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.87.0.tgz", - "integrity": "sha512-y3yYJV2esWr8LNjp3VNbSMWG7Y43jC8pCldG8YwiHGAQbsymkkMMt0aDT1xZIOFM2eFcNiUc+dJMx1+Z0UT8fg==", + "version": "1.88.0", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.88.0.tgz", + "integrity": "sha512-rWY+Bs6j/f1lvr8jqZTyp5arRMfovdxolcqGi+//+cPDOh8SBvzXH90e7BiSXct5HJ9HGW6jATchbRTpTJpEkw==", "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index 6660f892e7..ada1809c6a 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -426,7 +426,7 @@ "@types/adm-zip": "^0.5.5", "@types/mocha": "^10.0.6", "@types/node": "20.x", - "@types/vscode": "^1.87.0", + "@types/vscode": "^1.88.0", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "@vscode/test-electron": "^2.3.9", From 85b74b5ef9334a7845df0f9d415ae47f2a18ad8e Mon Sep 17 00:00:00 2001 From: Eastman Date: Fri, 5 Apr 2024 12:54:28 +0300 Subject: [PATCH 24/32] Update package.json --- vscode/microsoft-kiota/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index ada1809c6a..bd238cf461 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -8,7 +8,7 @@ "telemetryInstrumentationKey": "4c6357e0-daf9-42b5-bdfb-67878f8957b5", "icon": "images/logo.png", "engines": { - "vscode": "^1.87.0" + "vscode": "^1.88.0" }, "categories": [ "Other" From 9d569b9ba2e672fc40b08283d69614c86e009877 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 09:59:31 +0000 Subject: [PATCH 25/32] Bump typescript from 5.4.3 to 5.4.4 in /vscode/microsoft-kiota Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.4.3 to 5.4.4. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml) - [Commits](https://github.com/Microsoft/TypeScript/compare/v5.4.3...v5.4.4) --- updated-dependencies: - dependency-name: typescript dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 10 +++++----- vscode/microsoft-kiota/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index 601a14c4ac..1f22d88fee 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -27,12 +27,12 @@ "glob": "^10.3.12", "mocha": "^10.4.0", "ts-loader": "^9.5.1", - "typescript": "^5.4.3", + "typescript": "^5.4.4", "webpack": "^5.91.0", "webpack-cli": "^5.1.4" }, "engines": { - "vscode": "^1.87.0" + "vscode": "^1.88.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -3917,9 +3917,9 @@ } }, "node_modules/typescript": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.3.tgz", - "integrity": "sha512-KrPd3PKaCLr78MalgiwJnA25Nm8HAmdwN3mYUYZgG/wizIo9EainNVQI9/yDavtVFRN2h3k8uf3GLHuhDMgEHg==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "dev": true, "bin": { "tsc": "bin/tsc", diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index bd238cf461..cacb6f87e5 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -434,7 +434,7 @@ "glob": "^10.3.12", "mocha": "^10.4.0", "ts-loader": "^9.5.1", - "typescript": "^5.4.3", + "typescript": "^5.4.4", "webpack": "^5.91.0", "webpack-cli": "^5.1.4" }, From 90054a64f17f62c9ec0dbdd633166ff06428ce0f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:14:40 +0000 Subject: [PATCH 26/32] Bump @types/node from 20.12.4 to 20.12.5 in /vscode/microsoft-kiota Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.4 to 20.12.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- vscode/microsoft-kiota/package-lock.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vscode/microsoft-kiota/package-lock.json b/vscode/microsoft-kiota/package-lock.json index 1f22d88fee..0af5c2282b 100644 --- a/vscode/microsoft-kiota/package-lock.json +++ b/vscode/microsoft-kiota/package-lock.json @@ -492,9 +492,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.4.tgz", - "integrity": "sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==", + "version": "20.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.5.tgz", + "integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" From ea19ea2ba8d24e0293b6d4b768125c2716dbce07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:17:38 +0000 Subject: [PATCH 27/32] Bump @types/node from 20.12.4 to 20.12.5 in /it/typescript Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.12.4 to 20.12.5. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- it/typescript/package-lock.json | 8 ++++---- it/typescript/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/it/typescript/package-lock.json b/it/typescript/package-lock.json index 47fb776091..5047a1d5d5 100644 --- a/it/typescript/package-lock.json +++ b/it/typescript/package-lock.json @@ -22,7 +22,7 @@ }, "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.12.4", + "@types/node": "^20.12.5", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", @@ -827,9 +827,9 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.12.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.4.tgz", - "integrity": "sha512-E+Fa9z3wSQpzgYQdYmme5X3OTuejnnTx88A6p6vkkJosR3KBz+HpE3kqNm98VE6cfLFcISx7zW7MsJkH6KwbTw==", + "version": "20.12.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.5.tgz", + "integrity": "sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==", "dev": true, "dependencies": { "undici-types": "~5.26.4" diff --git a/it/typescript/package.json b/it/typescript/package.json index 4440393d26..62ab6550a4 100644 --- a/it/typescript/package.json +++ b/it/typescript/package.json @@ -19,7 +19,7 @@ "prettier": "./.prettierrc.json", "devDependencies": { "@es-exec/esbuild-plugin-start": "^0.0.5", - "@types/node": "^20.12.4", + "@types/node": "^20.12.5", "@typescript-eslint/eslint-plugin": "^7.5.0", "@typescript-eslint/parser": "^7.5.0", "esbuild": "^0.20.2", From f333f6e90d7579089934e8afe847f2a450cf8fce Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:23:46 +0000 Subject: [PATCH 28/32] Bump jakarta.annotation:jakarta.annotation-api in /it/java Bumps [jakarta.annotation:jakarta.annotation-api](https://github.com/jakartaee/common-annotations-api) from 2.1.1 to 3.0.0. - [Commits](https://github.com/jakartaee/common-annotations-api/compare/2.1.1...3.0.0) --- updated-dependencies: - dependency-name: jakarta.annotation:jakarta.annotation-api dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- it/java/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/java/pom.xml b/it/java/pom.xml index 6ff2f8edf9..26e4fd95d3 100644 --- a/it/java/pom.xml +++ b/it/java/pom.xml @@ -47,7 +47,7 @@ jakarta.annotation jakarta.annotation-api - 2.1.1 + 3.0.0 From fcebb650716d7a0cb7690cc1b55aecce6e8d282b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:45:21 +0000 Subject: [PATCH 29/32] Bump typing-extensions from 4.10.0 to 4.11.0 in /it/python Bumps [typing-extensions](https://github.com/python/typing_extensions) from 4.10.0 to 4.11.0. - [Release notes](https://github.com/python/typing_extensions/releases) - [Changelog](https://github.com/python/typing_extensions/blob/main/CHANGELOG.md) - [Commits](https://github.com/python/typing_extensions/compare/4.10.0...4.11.0) --- updated-dependencies: - dependency-name: typing-extensions dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- it/python/requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/it/python/requirements-dev.txt b/it/python/requirements-dev.txt index 334f6fddef..a9e9ad7985 100644 --- a/it/python/requirements-dev.txt +++ b/it/python/requirements-dev.txt @@ -56,7 +56,7 @@ tomli-w==1.0.0 ; python_version >= '3.7' tomlkit==0.12.4 ; python_version >= '3.7' -typing-extensions==4.10.0 ; python_version >= '3.7' +typing-extensions==4.11.0 ; python_version >= '3.7' urllib3==2.2.1 ; python_version >= '3.7' From 96da3af028a6193174f0a76276e8a2a8dbdbb4a0 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Mon, 8 Apr 2024 12:42:43 +0300 Subject: [PATCH 30/32] Test generation --- .../Extensions/OpenApiUrlTreeNodeExtensions.cs | 12 +++++++++++- src/Kiota.Builder/KiotaBuilder.cs | 3 ++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs b/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs index ea6116804f..046dd3dfc4 100644 --- a/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs +++ b/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs @@ -182,6 +182,16 @@ private static bool IsPathSegmentWithNumberOfParameters(this string currentSegme private static partial Regex stripExtensionForIndexersTestRegex(); // so {param-name}.json is considered as indexer public static bool IsComplexPathMultipleParameters(this OpenApiUrlTreeNode currentNode) => (currentNode?.DeduplicatedSegment()?.IsPathSegmentWithNumberOfParameters(static x => x.Any()) ?? false) && !currentNode.IsPathSegmentWithSingleSimpleParameter(); + + public static bool HasRequiredQueryParametersAcrossOperations(this OpenApiUrlTreeNode currentNode) + { + ArgumentNullException.ThrowIfNull(currentNode); + var pathItem = currentNode.PathItems[Constants.DefaultOpenApiLabel]; + var operationQueryParameters = pathItem.Operations.SelectMany(static x => x.Value.Parameters); + return operationQueryParameters.Union(pathItem.Parameters).Where(static x => x.In == ParameterLocation.Query) + .Any(static x => x.Required); + } + public static string GetUrlTemplate(this OpenApiUrlTreeNode currentNode, OperationType? operationType = null, bool includeQueryParameters = true, bool includeBaseUrl = true) { ArgumentNullException.ThrowIfNull(currentNode); @@ -192,7 +202,7 @@ public static string GetUrlTemplate(this OpenApiUrlTreeNode currentNode, Operati var operationQueryParameters = (operationType, pathItem.Operations.Any()) switch { (OperationType ot, _) when pathItem.Operations.TryGetValue(ot, out var operation) => operation.Parameters, - (null, true) => pathItem.Operations.OrderBy(static x => x.Key).FirstOrDefault().Value.Parameters, + (null, true) => pathItem.Operations.SelectMany(static x => x.Value.Parameters).Where(static x => x.In == ParameterLocation.Query), _ => Enumerable.Empty(), }; var parameters = pathItem.Parameters diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index 097d68ce33..ce8a3426ae 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1289,7 +1289,8 @@ private void CreateOperationMethods(OpenApiUrlTreeNode currentNode, OperationTyp Deprecation = deprecationInformation, }; var operationUrlTemplate = currentNode.GetUrlTemplate(operationType); - if (!operationUrlTemplate.Equals(parentClass.Properties.FirstOrDefault(static x => x.Kind is CodePropertyKind.UrlTemplate)?.DefaultValue?.Trim('"'), StringComparison.Ordinal)) + if (!operationUrlTemplate.Equals(parentClass.Properties.FirstOrDefault(static x => x.Kind is CodePropertyKind.UrlTemplate)?.DefaultValue?.Trim('"'), StringComparison.Ordinal) + && currentNode.HasRequiredQueryParametersAcrossOperations()) generatorMethod.UrlTemplateOverride = operationUrlTemplate; var mediaTypes = schema switch From 039a84c5fffa2205dc515fe95c29f3404eeb2dd3 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Mon, 8 Apr 2024 13:46:11 +0300 Subject: [PATCH 31/32] Fixes --- CHANGELOG.md | 6 ++ src/Kiota.Builder/KiotaBuilder.cs | 2 +- .../OpenApiUrlTreeNodeExtensionsTests.cs | 81 +++++++++++++++++++ 3 files changed, 88 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 252974848e..184394a048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +### Changed + +- Changed URI template generation to reuse templates when required templates are absent across operations. + ## [1.13.0] - 2024-04-04 ### Added diff --git a/src/Kiota.Builder/KiotaBuilder.cs b/src/Kiota.Builder/KiotaBuilder.cs index ce8a3426ae..1f8499d3d6 100644 --- a/src/Kiota.Builder/KiotaBuilder.cs +++ b/src/Kiota.Builder/KiotaBuilder.cs @@ -1290,7 +1290,7 @@ private void CreateOperationMethods(OpenApiUrlTreeNode currentNode, OperationTyp }; var operationUrlTemplate = currentNode.GetUrlTemplate(operationType); if (!operationUrlTemplate.Equals(parentClass.Properties.FirstOrDefault(static x => x.Kind is CodePropertyKind.UrlTemplate)?.DefaultValue?.Trim('"'), StringComparison.Ordinal) - && currentNode.HasRequiredQueryParametersAcrossOperations()) + && currentNode.HasRequiredQueryParametersAcrossOperations())// no need to generate extra strings/templates as optional parameters will have no effect on resolved url. generatorMethod.UrlTemplateOverride = operationUrlTemplate; var mediaTypes = schema switch diff --git a/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs b/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs index 0a7030661a..7a0c41f151 100644 --- a/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs +++ b/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs @@ -232,12 +232,93 @@ public void DifferentUrlTemplatesPerOperation() } }); var node = OpenApiUrlTreeNode.Create(doc, Label); + Assert.False(node.HasRequiredQueryParametersAcrossOperations()); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24select}", node.Children.First().Value.GetUrlTemplate()); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24select}", node.Children.First().Value.GetUrlTemplate(OperationType.Get)); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment", node.Children.First().Value.GetUrlTemplate(OperationType.Put)); // the query parameters will be decoded by a middleware at runtime before the request is executed } [Fact] + public void DifferentUrlTemplatesPerOperationWithRequiredParameter() + { + var doc = new OpenApiDocument + { + Paths = [], + }; + doc.Paths.Add("{param-with-dashes}\\existing-segment", new() + { + Parameters = [ + new() + { + Name = "param-with-dashes", + In = ParameterLocation.Path, + Required = true, + Schema = new() + { + Type = "string" + }, + Style = ParameterStyle.Simple, + }, + ], + Operations = new Dictionary { + { OperationType.Get, new() { + Parameters = [ + + new (){ + Name = "$select", + In = ParameterLocation.Query, + Schema = new () { + Type = "string" + }, + Style = ParameterStyle.Simple, + } + ] + } + }, + { OperationType.Post, new() { + Parameters = [ + + new (){ + Name = "$expand", + In = ParameterLocation.Query, + Schema = new () { + Type = "string" + }, + Style = ParameterStyle.Simple, + } + ] + } + }, + { + OperationType.Put, new() {} + }, + { OperationType.Delete, new() { + Parameters = [ + + new (){ + Name = "id", + In = ParameterLocation.Query, + Schema = new () { + Type = "string" + }, + Style = ParameterStyle.Simple, + Required = true + } + ] + } + }, + } + }); + var node = OpenApiUrlTreeNode.Create(doc, Label); + Assert.True(node.HasRequiredQueryParametersAcrossOperations()); + Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment?id={id}{&%24expand,%24select}", node.Children.First().Value.GetUrlTemplate());//the default contains a combination of everything. + Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24select}", node.Children.First().Value.GetUrlTemplate(OperationType.Get)); + Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24expand}", node.Children.First().Value.GetUrlTemplate(OperationType.Post)); + Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment", node.Children.First().Value.GetUrlTemplate(OperationType.Put)); + Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment?id={id}", node.Children.First().Value.GetUrlTemplate(OperationType.Delete)); + // the query parameters will be decoded by a middleware at runtime before the request is executed + } + [Fact] public void GeneratesRequiredQueryParametersAndOptionalMixInPathItem() { var doc = new OpenApiDocument From 3ce38134f0db89da200f7ea8b12042b0c0005a04 Mon Sep 17 00:00:00 2001 From: Andrew Omondi Date: Mon, 8 Apr 2024 14:11:09 +0300 Subject: [PATCH 32/32] Fix tests --- src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs | 4 +++- .../Extensions/OpenApiUrlTreeNodeExtensionsTests.cs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs b/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs index 046dd3dfc4..ba925d728b 100644 --- a/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs +++ b/src/Kiota.Builder/Extensions/OpenApiUrlTreeNodeExtensions.cs @@ -186,7 +186,9 @@ public static bool IsComplexPathMultipleParameters(this OpenApiUrlTreeNode curre public static bool HasRequiredQueryParametersAcrossOperations(this OpenApiUrlTreeNode currentNode) { ArgumentNullException.ThrowIfNull(currentNode); - var pathItem = currentNode.PathItems[Constants.DefaultOpenApiLabel]; + if (!currentNode.PathItems.TryGetValue(Constants.DefaultOpenApiLabel, out var pathItem)) + return false; + var operationQueryParameters = pathItem.Operations.SelectMany(static x => x.Value.Parameters); return operationQueryParameters.Union(pathItem.Parameters).Where(static x => x.In == ParameterLocation.Query) .Any(static x => x.Required); diff --git a/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs b/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs index 7a0c41f151..dba74a113f 100644 --- a/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs +++ b/tests/Kiota.Builder.Tests/Extensions/OpenApiUrlTreeNodeExtensionsTests.cs @@ -233,6 +233,7 @@ public void DifferentUrlTemplatesPerOperation() }); var node = OpenApiUrlTreeNode.Create(doc, Label); Assert.False(node.HasRequiredQueryParametersAcrossOperations()); + Assert.False(node.Children.First().Value.HasRequiredQueryParametersAcrossOperations()); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24select}", node.Children.First().Value.GetUrlTemplate()); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24select}", node.Children.First().Value.GetUrlTemplate(OperationType.Get)); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment", node.Children.First().Value.GetUrlTemplate(OperationType.Put)); @@ -310,7 +311,8 @@ public void DifferentUrlTemplatesPerOperationWithRequiredParameter() } }); var node = OpenApiUrlTreeNode.Create(doc, Label); - Assert.True(node.HasRequiredQueryParametersAcrossOperations()); + Assert.False(node.HasRequiredQueryParametersAcrossOperations()); + Assert.True(node.Children.First().Value.HasRequiredQueryParametersAcrossOperations()); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment?id={id}{&%24expand,%24select}", node.Children.First().Value.GetUrlTemplate());//the default contains a combination of everything. Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24select}", node.Children.First().Value.GetUrlTemplate(OperationType.Get)); Assert.Equal("{+baseurl}/{param%2Dwith%2Ddashes}/existing-segment{?%24expand}", node.Children.First().Value.GetUrlTemplate(OperationType.Post));