diff --git a/vscode/microsoft-kiota/CHANGELOG.md b/vscode/microsoft-kiota/CHANGELOG.md index e1a6bf8573..59ef66bfb3 100644 --- a/vscode/microsoft-kiota/CHANGELOG.md +++ b/vscode/microsoft-kiota/CHANGELOG.md @@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file. ### Added +- Added dart generation to Visual Studio Code extension. + ### Changed ## [1.22.100000001] - 2025-01-10 diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index 2478c6889e..1465383b4a 100644 --- a/vscode/microsoft-kiota/package.json +++ b/vscode/microsoft-kiota/package.json @@ -83,6 +83,25 @@ ], "description": "%kiota.generate.deserializer.description%" }, + "kiota.generate.serializer.Dart": { + "type": "array", + "default": [ + "microsoft_kiota_serialization_json/microsoft_kiota_serialization_json.JsonSerializationWriterFactory", + "microsoft_kiota_serialization_form/microsoft_kiota_serialization_form.FormSerializationWriterFactory", + "microsoft_kiota_serialization_text/microsoft_kiota_serialization_text.TextSerializationWriterFactory", + "microsoft_kiota_serialization_multipart/microsoft_kiota_serialization_multipart.MultipartSerializationWriterFactory" + ], + "description": "%kiota.generate.serializer.description%" + }, + "kiota.generate.deserializer.Dart": { + "type": "array", + "default": [ + "microsoft_kiota_serialization_json/microsoft_kiota_serialization_json.JsonParseNodeFactory", + "microsoft_kiota_serialization_text/microsoft_kiota_serialization_text.TextParseNodeFactory", + "microsoft_kiota_serialization_form/microsoft_kiota_serialization_form.FormParseNodeFactory" + ], + "description": "%kiota.generate.deserializer.description%" + }, "kiota.generate.serializer.Go": { "type": "array", "default": [ @@ -547,4 +566,4 @@ "sha256": "2525D4A8C3ED4972C05E57E4DB2D244E1A708325CE4A5CFB24822D9FD7BB7ED3" } ] -} \ No newline at end of file +} diff --git a/vscode/microsoft-kiota/src/kiotaInterop/index.ts b/vscode/microsoft-kiota/src/kiotaInterop/index.ts index 490780d03b..e09cf84a9e 100644 --- a/vscode/microsoft-kiota/src/kiotaInterop/index.ts +++ b/vscode/microsoft-kiota/src/kiotaInterop/index.ts @@ -122,6 +122,8 @@ export function generationLanguageToString(language: KiotaGenerationLanguage): s return "Ruby"; case KiotaGenerationLanguage.CLI: return "CLI"; + case KiotaGenerationLanguage.Dart: + return "Dart"; default: throw new Error("unknown language"); } @@ -137,6 +139,7 @@ export const allGenerationLanguages = [ KiotaGenerationLanguage.CLI, KiotaGenerationLanguage.Swift, KiotaGenerationLanguage.TypeScript, + KiotaGenerationLanguage.Dart, ]; /** diff --git a/vscode/microsoft-kiota/src/test/suite/commands/generateClientCommand.test.ts b/vscode/microsoft-kiota/src/test/suite/commands/generateClientCommand.test.ts index 5f7b4de9ee..8537b10b07 100644 --- a/vscode/microsoft-kiota/src/test/suite/commands/generateClientCommand.test.ts +++ b/vscode/microsoft-kiota/src/test/suite/commands/generateClientCommand.test.ts @@ -65,7 +65,8 @@ let extensionSettings = { [KiotaGenerationLanguage.Python]: { serializers: [], deserializers: [] }, [KiotaGenerationLanguage.Ruby]: { serializers: [], deserializers: [] }, [KiotaGenerationLanguage.Swift]: { serializers: [], deserializers: [] }, - [KiotaGenerationLanguage.TypeScript]: { serializers: [], deserializers: [] } + [KiotaGenerationLanguage.TypeScript]: { serializers: [], deserializers: [] }, + [KiotaGenerationLanguage.Dart]: { serializers: [], deserializers: [] } }, }; diff --git a/vscode/microsoft-kiota/src/types/enums.ts b/vscode/microsoft-kiota/src/types/enums.ts index e3340f0b2c..e4859d4acb 100644 --- a/vscode/microsoft-kiota/src/types/enums.ts +++ b/vscode/microsoft-kiota/src/types/enums.ts @@ -26,6 +26,8 @@ export enum KiotaGenerationLanguage { Ruby = 7, // eslint-disable-next-line @typescript-eslint/naming-convention CLI = 8, + // eslint-disable-next-line @typescript-eslint/naming-convention + Dart = 9, }; export enum KiotaPluginType { diff --git a/vscode/microsoft-kiota/src/types/extensionSettings.ts b/vscode/microsoft-kiota/src/types/extensionSettings.ts index 172d8106cb..fe5ccfb0d3 100644 --- a/vscode/microsoft-kiota/src/types/extensionSettings.ts +++ b/vscode/microsoft-kiota/src/types/extensionSettings.ts @@ -20,6 +20,7 @@ export function getExtensionSettings(extensionId: string): ExtensionSettings { [KiotaGenerationLanguage.Ruby]: getLanguageSerializationConfiguration(extensionId, "Ruby"), [KiotaGenerationLanguage.Swift]: getLanguageSerializationConfiguration(extensionId, "Swift"), [KiotaGenerationLanguage.TypeScript]: getLanguageSerializationConfiguration(extensionId, "TypeScript"), + [KiotaGenerationLanguage.Dart]: getLanguageSerializationConfiguration(extensionId, "Dart"), }, }; } diff --git a/vscode/microsoft-kiota/src/util.ts b/vscode/microsoft-kiota/src/util.ts index b07930e64d..ab6146f49e 100644 --- a/vscode/microsoft-kiota/src/util.ts +++ b/vscode/microsoft-kiota/src/util.ts @@ -138,6 +138,8 @@ export function parseGenerationLanguage(value: string): KiotaGenerationLanguage return KiotaGenerationLanguage.Ruby; case "cli": return KiotaGenerationLanguage.CLI; + case "dart": + return KiotaGenerationLanguage.Dart; default: throw new Error("unknown language " + value); }