diff --git a/src/transform/paths.ts b/src/transform/paths.ts index 03201865a..00a2ce4f9 100644 --- a/src/transform/paths.ts +++ b/src/transform/paths.ts @@ -101,7 +101,7 @@ export function transformPathsObj(paths: Record, options * Generate an Enum with operation names as keys and the corresponding paths as values. */ export function makeApiPathsEnum(paths: Record): string { - let output = "enum ApiPaths {\n"; + let output = "export enum ApiPaths {\n"; for (const [url, pathItem] of Object.entries(paths)) { for (const [method, operation] of Object.entries(pathItem)) { diff --git a/test/bin/expected/paths-enum.ts b/test/bin/expected/paths-enum.ts index 73eb9fc74..b613340c7 100644 --- a/test/bin/expected/paths-enum.ts +++ b/test/bin/expected/paths-enum.ts @@ -489,7 +489,7 @@ export interface operations { export interface external {} -enum ApiPaths { +export enum ApiPaths { updatePet = "/pet", addPet = "/pet", findPetsByStatus = "/pet/findByStatus",