Hello, I didn't find anything how to deserialize t...
# moko
m
Hello, I didn't find anything how to deserialize timestamps. Currently generated models converts date time as String. (e.g. like it is defined here https://github.com/bundesAPI/autobahn-api/blob/main/openapi.yaml#L417) Do I miss something? I do remember, that with the plain OpenApi plugin I could define date time library explicitly. For KMP I think a
kotlinx.datetime.LocalDate
could be taken by default. Of course there is no deal to do date conversion during DTO=>domain mapping. Any thoughts on this ?
🤔 1
a
hi! now out of box not supported any date-time conversion. you can just add extension property to generated entity for example:
Copy code
val MyEntity.createdAtDT: DateTime get() = parse createdAt string to DateTime by your library
sry for late reply 😞
🙏 1