Open bhawna85 opened 3 years ago
It has always been generated like that for inline. A workaround is to move the enum to a top-level model. I wouldn't have time for now to implement such feature. Help is welcome.
Is there any chance this will get looked at?
Currently it means working with enums is pretty ugly on the typescript side
Its generated as : export interface StatusModel status?: 'APPROVED' | 'INELIGIBLE' | 'PENDING'; }
should be generated as: export interface StatusModel{ status?: StatusModel.StatusEnum; export type StatusEnum = 'APPROVED' | 'INELIGIBLE' | 'PENDING' ; export const StatusEnum = { APPROVED: 'APPROVED' as StatusEnum, INELIGIBLE: 'INELIGIBLE' as StatusEnum, PENDING: 'PENDING' as StatusEnum }; }