showWithReviews test case breaks if submittedDate is added
richardcresswell opened this issue · 0 comments
richardcresswell commented
If you change this line to
.reviews().submittedDate()
The ObjectMapper cannot deserialize the date.
Error deserializing data from '{"data":{"shows":[{"title":"mock title","reviews":[{"submittedDate":"2021-04-15T11:37:22.424887-04:00","username":"DGS User","starScore":5},{"submittedDate":"2021-04-15T11:37:22.424953-04:00","username":"DGS User 2","starScore":3}]}]}}' with JsonPath 'data.shows[*]' and target class java.util.List<com.example.demo.generated.types.Show>
DgsQueryExecutionDataExtractionException(ex=com.jayway.jsonpath.spi.mapper.MappingException: java.lang.IllegalArgumentException: Cannot construct instance of `java.time.OffsetDateTime` (no Creators, like default constructor, exist): no String-argument constructor/factory method to deserialize from String value ('2021-04-15T11:37:22.424887-04:00')