Skip to content

Commit

Permalink
Resolve review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fey101 committed Aug 27, 2024
1 parent d905b04 commit 06febfe
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 24 deletions.
2 changes: 0 additions & 2 deletions vscode/microsoft-kiota/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,7 @@ export async function activate(
if (uri.path === "/") {
return;
}
console.log(uri);
const queryParameters = getQueryParameters(uri);
console.log(queryParameters);
if (uri.path.toLowerCase() === "/opendescription") {
deepLinkParams = validateDeepLinkQueryParams(queryParameters);
reporter.sendTelemetryEvent("DeepLink.OpenDescription", deepLinkParams);
Expand Down
24 changes: 12 additions & 12 deletions vscode/microsoft-kiota/src/steps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@ export function transformToGenerationconfig(deepLinkParams: Record<string, strin
{
generationConfig["pluginName"] = deepLinkParams.name;
switch(deepLinkParams.type){
case "apiplugin":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ["ApiPlugin"];
break;
case "openai":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ['OpenAI'];
break;
case "apimanifest":
generationConfig["generationType"] = "apimanifest";
break;
}
case "apiplugin":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ["ApiPlugin"];
break;
case "openai":
generationConfig["generationType"] = "plugin";
generationConfig["pluginTypes"] = ['OpenAI'];
break;
case "apimanifest":
generationConfig["generationType"] = "apimanifest";
break;
}
}
return generationConfig;
}
Expand Down
11 changes: 1 addition & 10 deletions vscode/microsoft-kiota/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,32 +118,23 @@ export function parseGenerationType(generationType: string | QuickPickItem | und
}

export function parseGenerationLanguage(value: string): KiotaGenerationLanguage {
switch (value) {
case "CSharp":
switch (value.toLowerCase()) {
case "csharp":
return KiotaGenerationLanguage.CSharp;
case "Java":
case "java":
return KiotaGenerationLanguage.Java;
case "TypeScript":
case "typescript":
return KiotaGenerationLanguage.TypeScript;
case "PHP":
case "php":
return KiotaGenerationLanguage.PHP;
case "Python":
case "python":
return KiotaGenerationLanguage.Python;
case "Go":
case "go":
return KiotaGenerationLanguage.Go;
case "Swift":
case "swift":
return KiotaGenerationLanguage.Swift;
case "Ruby":
case "ruby":
return KiotaGenerationLanguage.Ruby;
case "CLI":
case "cli":
return KiotaGenerationLanguage.CLI;
default:
Expand Down

0 comments on commit 06febfe

Please sign in to comment.