Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Pan Shao committed Jan 22, 2025
1 parent 38a5fae commit 99442ff
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages/extensions/openapi-to-typespec/src/utils/imports.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ export type Imports = {
};

export function getMainImports(program: TypespecProgram): Imports {
const modules = new Set<string>();
const namespaces = new Set<string>();
const modules: string[] = [];
const namespaces: string[] = [];
if (program.serviceInformation.authentication?.some((a) => a.kind === "AadOauth2Auth")) {
modules.add(`import "@azure-tools/typespec-azure-core";`);
namespaces.add("using Azure.Core;");
modules.push(`import "@azure-tools/typespec-azure-core";`);
namespaces.push("using Azure.Core;");
}
return {
modules: [...modules],
namespaces: [...namespaces],
modules,
namespaces,
};
}

Expand Down

0 comments on commit 99442ff

Please sign in to comment.