[BUG][SPRING] SpringBoot module generates api with wrong date format on nested objects
Created by: qbixsd
Bug Report Checklist
-
Have you provided a full/minimal spec to reproduce the issue? -
Have you validated the input using an OpenAPI validator (example)? -
What's the version of OpenAPI Generator used? -
Have you search for related issues/PRs? -
What's the actual output vs expected output? -
[Optional] Bounty to sponsor the fix (example)
Description
When setting contract, that accepts object with string defined as date, the default format to parse that is still SHORT, instead of ISO. The issue https://github.com/OpenAPITools/openapi-generator/issues/2053 has fixed the problem only when the controller method accepts the date directly. It's not working as supposed, when the controller accepts the objects based on query params.
openapi-generator version
4.2.3
OpenAPI declaration file content or url
https://github.com/qbixsd/openapi-test/blob/master/openapi-test-contract/src/main/resources/api.yaml
Command line used for generation
mvn clean compile
Steps to reproduce
run tests for openapi-test-implementation module from https://github.com/qbixsd/openapi-test
- test for firstEndpoint (with dates defined at contract root) passes with ISO dates
- both tests for secondEndpoint (with dates defined in nested objects) fail due to contract accepting dates as SHORT instead of ISO
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/issues/2053
Suggest a fix
Maybe it would be a good idea to fill in Json deserializing annotations on given properties in a model?