restfulapi / restful-api

Grails plugin to facilitate exposing non-trivial RESTful APIs
Apache License 2.0
52 stars 27 forks source link

Lenient date parsing on extractors #17

Closed sriddell closed 10 years ago

sriddell commented 10 years ago

The extractors can attempt to parse dates via default or supplied formats, but always do so with a SimpleDateParser, which uses lenient parsing.

At a minimum, the dsl needs to be able to specify non-lenient date parsing. Should also consider whether non-lenient should be the default.

Example is that "1982-99-99" gets parsed into "1990-06-07" instead of throwing an error because of lenient defaulting to true.

sriddell commented 10 years ago

Fixed in 427a8dad3dbf4f7c1d707795bccbed99e5764fe1. Parsing is no longer lenient by default, but can be specified to be lenient in the dsl.