[REQ] [typescript-axios] Use generated enums in operations
Created by: chaayac
Is your feature request related to a problem? Please describe.
When using API functions generated from this, I want to be able to also use the enum types. The enums are generated for models, but they should also be generated for operations too.
Describe the solution you'd like
Generate and use enum types in operations.
Describe alternatives you've considered
Just hard-coding the enum values when using operations, but that's not great.
Additional context
e.g.
findPetsByStatus: async (status: Array<'available' | 'pending' | 'sold'>, ...
should be
findPetsByStatus: async (status: Array<FindPetsByStatusStatusEnum>, ...
...
export const FindPetsByStatusStatusEnum = {
Available: 'available',
Pending: 'pending',
Sold: 'sold'
} as const;
export type FindPetsByStatusStatusEnum = typeof FindPetsByStatusStatusEnum[keyof typeof FindPetsByStatusStatusEnum];