diff --git a/vscode/microsoft-kiota/CHANGELOG.md b/vscode/microsoft-kiota/CHANGELOG.md index 86bd23079f..3c530e5d9f 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 - Fixed a bug in the VS Code extension deeplink with the API Center extension [#6004](https://github.com/microsoft/kiota/issues/6004) diff --git a/vscode/microsoft-kiota/package.json b/vscode/microsoft-kiota/package.json index 2478c6889e..ad06b5cb2f 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": [ @@ -125,7 +144,9 @@ "type": "array", "default": [ "Microsoft\\Kiota\\Serialization\\Json\\JsonSerializationWriterFactory", - "Microsoft\\Kiota\\Serialization\\Text\\TextSerializationWriterFactory" + "Microsoft\\Kiota\\Serialization\\Text\\TextSerializationWriterFactory", + "Microsoft\\Kiota\\Serialization\\Form\\FormSerializationWriterFactory", + "Microsoft\\Kiota\\Serialization\\Multipart\\MultipartSerializationWriterFactory" ], "description": "%kiota.generate.serializer.description%" }, @@ -133,7 +154,8 @@ "type": "array", "default": [ "Microsoft\\Kiota\\Serialization\\Json\\JsonParseNodeFactory", - "Microsoft\\Kiota\\Serialization\\Text\\TextParseNodeFactory" + "Microsoft\\Kiota\\Serialization\\Text\\TextParseNodeFactory", + "Microsoft\\Kiota\\Serialization\\Form\\FormParseNodeFactory" ], "description": "%kiota.generate.deserializer.description%" }, @@ -141,7 +163,9 @@ "type": "array", "default": [ "kiota_serialization_json.json_serialization_writer_factory.JsonSerializationWriterFactory", - "kiota_serialization_text.text_serialization_writer_factory.TextSerializationWriterFactory" + "kiota_serialization_text.text_serialization_writer_factory.TextSerializationWriterFactory", + "kiota_serialization_form.form_serialization_writer_factory.FormSerializationWriterFactory", + "kiota_serialization_multipart.multipart_serialization_writer_factory.MultipartSerializationWriterFactory" ], "description": "%kiota.generate.serializer.description%" }, @@ -149,7 +173,8 @@ "type": "array", "default": [ "kiota_serialization_json.json_parse_node_factory.JsonParseNodeFactory", - "kiota_serialization_text.text_parse_node_factory.TextParseNodeFactory" + "kiota_serialization_text.text_parse_node_factory.TextParseNodeFactory", + "kiota_serialization_form.form_parse_node_factory.FormParseNodeFactory" ], "description": "%kiota.generate.deserializer.description%" }, @@ -547,4 +572,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); }