You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA, "Whether to use the RxJava adapter with the retrofit2 library."));
36
38
cliOptions.add(CliOption.newBoolean(PARCELABLE_MODEL, "Whether to generate models for Android that implement Parcelable with the okhttp-gson library."));
39
+
cliOptions.add(CliOption.newBoolean(SUPPORT_JAVA6, "Whether to support Java6 with the Jersey1 library. (Default: false)"));
37
40
38
-
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.1. JSON processing: Jackson 2.7.0");
41
+
supportedLibraries.put("jersey1", "HTTP client: Jersey client 1.19.1. JSON processing: Jackson 2.7.0. Enable Java6 support using '-DsupportJava6=true'.");
39
42
supportedLibraries.put("feign", "HTTP client: Netflix Feign 8.16.0. JSON processing: Jackson 2.7.0");
40
43
supportedLibraries.put("jersey2", "HTTP client: Jersey client 2.22.2. JSON processing: Jackson 2.7.0");
41
44
supportedLibraries.put("okhttp-gson", "HTTP client: OkHttp 2.7.5. JSON processing: Gson 2.6.2. Enable Parcelable modles on Android using '-DparcelableModel=true'");
@@ -44,9 +47,9 @@ public JavaClientCodegen() {
44
47
45
48
CliOptionlibraryOption = newCliOption(CodegenConstants.LIBRARY, "library template (sub-template) to use");
46
49
libraryOption.setEnum(supportedLibraries);
50
+
// set okhttp-gson as the default
47
51
libraryOption.setDefault("okhttp-gson");
48
52
cliOptions.add(libraryOption);
49
-
50
53
setLibrary("okhttp-gson");
51
54
52
55
}
@@ -79,6 +82,11 @@ public void processOpts() {
79
82
// put the boolean value back to PARCELABLE_MODEL in additionalProperties
0 commit comments