Generated API wrapper returns undefined
instead Date if the timestamp is 0
#3043
Labels
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
In OpenApi I have a type defined as
In the generated api client it has a non-optional
Date
type. But in the application, I getundefined
if the processed timestamp is0
.I expect it to be
new Date(0)
or the generated type to beDate | undefined
(not preferable).Reproduction
OpenAPI schema
autorest.yaml
npm dependencies
reproduction.ts
I expect it to print
1970-01-01T00:00:00.000Z
insteadundefined
.The text was updated successfully, but these errors were encountered: