js2d-gradle icon indicating copy to clipboard operation
js2d-gradle copied to clipboard

dateTimeFormat type

Open flyasky opened this issue 1 week ago • 2 comments

dateTimeFormat (How date-time fields will be formatted during serialization.) is String in the documentation https://github.com/jsonschema2dataclass/js2d-gradle/blob/main/docs/usage/parameters_6.adoc#date-time-fields-generation-parameters, but Boolean in the plugin:

    @get:Input
    @get:Optional
    abstract val dateTimeFormat: Property<Boolean>

The issue is if I set up just dateTimePattern.set("yyyy-MM-dd'T'HH:mm:ss[.SSS][XXX]") especially [.SSS] then on serialization it adds .000 to the dates.

flyasky avatar Feb 13 '25 10:02 flyasky