Skip to content

Commit 8b79503

Browse files
committed
fix: export enum of operation paths
Closes #911
1 parent 23dc67f commit 8b79503

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/transform/paths.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ export function transformPathsObj(paths: Record<string, PathItemObject>, options
101101
* Generate an Enum with operation names as keys and the corresponding paths as values.
102102
*/
103103
export function makeApiPathsEnum(paths: Record<string, PathItemObject>): string {
104-
let output = "enum ApiPaths {\n";
104+
let output = "export enum ApiPaths {\n";
105105

106106
for (const [url, pathItem] of Object.entries(paths)) {
107107
for (const [method, operation] of Object.entries(pathItem)) {

test/bin/expected/paths-enum.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ export interface operations {
488488

489489
export interface external {}
490490

491-
enum ApiPaths {
491+
export enum ApiPaths {
492492
updatePet = "/pet",
493493
addPet = "/pet",
494494
findPetsByStatus = "/pet/findByStatus",

0 commit comments

Comments
 (0)