Merge branch 'gson_date' of https://github.com/cbornet/swagger-codegen into cbornet-gson_date

This commit is contained in:
wing328
2016-10-11 00:32:20 +08:00
16 changed files with 1984 additions and 1326 deletions

View File

@@ -259,6 +259,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");

View File

@@ -134,6 +134,9 @@ public class JavaClientCodegen extends AbstractJavaCodegen {
supportingFiles.add(new SupportingFile("auth/OAuthOkHttpClient.mustache", authFolder, "OAuthOkHttpClient.java"));
supportingFiles.add(new SupportingFile("CollectionFormats.mustache", invokerFolder, "CollectionFormats.java"));
additionalProperties.put("gson", "true");
if ("retrofit2".equals(getLibrary())) {
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
}
} else if("jersey2".equals(getLibrary())) {
supportingFiles.add(new SupportingFile("JSON.mustache", invokerFolder, "JSON.java"));
additionalProperties.put("jackson", "true");