Swagger-codegen: Change date format used for Jackson

Viewed 245

I use swagger-codegen to generate the java code for a third-party webservice.

I'm using this relevant options: "java8": true, "dateLibrary": "legacy", "library": "resttemplate", "serializationLibrary": "jackson"

When I try to POST a object with date fields, I receive this error message from server:

"JSON parse error: Invalid value for EpochDay (valid values -365243219162 - 365241780471): 1621296000000"

Where can I configure the date format that jackson uses for serialization?

Note: I don't want to change the models generated by swagger-codegen (where the @JsonFormat (pattern = "xxx") notation could solve).

0 Answers
Related