Open rcomesan opened 5 months ago
I am interested in this feature. A similar, useful, feature would be to have separate types for OpenAPI date
and date-time
string formats.
I was just trying to find a workaround for this as well but couldn't find any.
The doc claims "You can choose to use any Date library you want", but unless you can specify the client to use that library's type it wouldn't really be usable as the type signature would remain incorrect.
What are the steps to reproduce this issue?
Set useDates to true in the output configuration:
What happens?
It generates TypeScript interfaces using the standard Date data type when the schema format is 'date' or 'date-time'.
What were you expecting to happen?
I was expecting to have a way to customize the data type used here. I have a custom class that I use for dates and I'd like to import it and use that instead of the standard Date object.
I know I must handle date parsing/construction myself, but even if I do this the interfaces are defined with Date instead of my custom DateTime class.
Any other comments?
Is there a way to achieve this? If not, is there any interest in such a feature?