phoenixnap / springmvc-raml-plugin

Spring MVC - RAML Spec Synchroniser Plugin. A Maven plugin designed to Generate Server & Client code in Spring from a RAML API descriptor and conversely, a RAML API document from the SpringMVC Server implementation.
Apache License 2.0
136 stars 84 forks source link

Add possibility to use Java Time instead of java.util.Date #253

Closed ivan-mladenovic closed 6 years ago

ivan-mladenovic commented 6 years ago

Please add an option to be able to use Java Time instead of java.util.Date.

stojsavljevic commented 6 years ago

Now you can use generationConfig to configure desired date and time types. Example config:

<configuration>
    ...
    <generationConfig>
        ...
        <dateTimeType>java.time.ZonedDateTime</dateTimeType>
        <dateType>java.time.LocalDate</dateType>
        <timeType>java.time.LocalTime</timeType>
    </generationConfig> 
</configuration>

This applies to data types, query and uri parameters and headers.