[okhttp] use gson ISO8601Utils to parse dates

this allows to remove a lot of code in the ApiClient.
Tests for the ApiClient thus have been move to JSONTest.
Also allow to configure the date formatter of all date types individually.
An assertion in testCreateAndGetPetAsync() is removed because it's useless and makes the test fail randomly.

See #3727
This commit is contained in:
cbornet
2016-09-13 15:57:34 +02:00
parent 766b04a2bd
commit 2a0574a3ad
9 changed files with 760 additions and 928 deletions

View File

@@ -260,6 +260,7 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
}
if("joda".equals(dateLibrary)) {
additionalProperties.put("joda", "true");
typeMapping.put("date", "LocalDate");
typeMapping.put("DateTime", "DateTime");