-
-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Hi,
Is it possible to generate real TypeScript enums from an OpenAPI spec that has:
type:
myProperty: string
enum:
- A
- B
- CNow it generates a union type myProperty: "A" | "B" | "C"
However, I want something like:
myProperty: MyEnum
const enum MyEnum {
A = 'A',
B = 'B',
C = 'C'
}Or possibly:
const MyEnum {
A: 'A',
B: 'B',
C: 'C'
} as const;
type MyEnum = typeof MyEnum[keyof typeof MyEnum];Metadata
Metadata
Assignees
Labels
No labels