Skip to content

Commit 08d42a6

Browse files
fix: export enum of operation paths (#912)
Closes #911
1 parent 2a84534 commit 08d42a6

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
@@ -489,7 +489,7 @@ export interface operations {
489489

490490
export interface external {}
491491

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

0 commit comments

Comments
 (0)