openapi-ts icon indicating copy to clipboard operation
openapi-ts copied to clipboard

useDateType should convert datetime strings to date objects.

Open seriouslag opened this issue 11 months ago • 31 comments

Describe the problem

useDateType marks the models as Date objects. The service does not convert the date strings to date objects.

This is causing the model generated as (Date) to be incorrect compared to the actual data (string). This library should take care of the conversion.

Describe the proposed solution

The useDateType should convert the string in the datetime format to a JS Date object so the data types match.

Alternatives considered

No response

Importance

nice to have

Additional information

No response

seriouslag avatar Mar 26 '24 14:03 seriouslag