I would like to know is there a way to make the OpenApi generated classes to show their proper date and time format. I read a few topics on this and none of them help. Here is a sample of the build.gradle:
configOptions.set([
dateLibrary : "java8",
])
library.set("jersey2")
typeMappings.set([
ZonedDateTime: ZonedDateTime,
LocalDateTime: LocalDateTime,
])
importMappings.set([
ZonedDateTime: "java.time.ZonedDateTime",
LocalDateTime: "java.time.LocalDateTime",
])
The thing is, this will generate all datetime formats in OffsetDateTime. I did this in typeMappings: OffsetDateTime: "java.time.ZonedDateTime". This forced everything to be generated in ZonedDateTime. Is there a way to have multiple date and time formats? I want to have ZonedDateTime, LocalDateTime and etc. Also tried to set the dateLibrary: "custom" and to create the mappings my self, didn't work as well.