forked from loafle/openapi-generator-original
[Java][jersey1] add Java6 support to Java (jersey1) API client (#3919)
* add java6 support to java jersey1 * properly handle boolean value in mustache tag * add test for supportJava6 option
This commit is contained in:
@@ -56,6 +56,8 @@ public class JavaClientOptionsTest extends AbstractOptionsTest {
|
||||
times = 1;
|
||||
clientCodegen.setFullJavaUtil(Boolean.valueOf(JavaOptionsProvider.FULL_JAVA_UTIL_VALUE));
|
||||
times = 1;
|
||||
//clientCodegen.setSupportJava6(Boolean.valueOf(JavaOptionsProvider.SUPPORT_JAVA6));
|
||||
//times = 1;
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ public class JavaClientOptionsProvider extends JavaOptionsProvider {
|
||||
options.put(CodegenConstants.LIBRARY, DEFAULT_LIBRARY_VALUE);
|
||||
options.put(JavaClientCodegen.USE_RX_JAVA, "false");
|
||||
options.put(JavaClientCodegen.PARCELABLE_MODEL, "false");
|
||||
options.put(JavaClientCodegen.SUPPORT_JAVA6, "false");
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ public class JavaOptionsProvider implements OptionsProvider {
|
||||
public static final String SERIALIZABLE_MODEL_VALUE = "false";
|
||||
public static final String FULL_JAVA_UTIL_VALUE = "true";
|
||||
public static final String ENSURE_UNIQUE_PARAMS_VALUE = "true";
|
||||
//public static final String SUPPORT_JAVA6 = "true";
|
||||
|
||||
private ImmutableMap<String, String> options;
|
||||
|
||||
@@ -42,6 +43,7 @@ public class JavaOptionsProvider implements OptionsProvider {
|
||||
.put(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, "true")
|
||||
.put(JavaClientCodegen.DATE_LIBRARY, "joda")
|
||||
.put("hideGenerationTimestamp", "true")
|
||||
//.put("supportJava6", "true")
|
||||
.build();
|
||||
}
|
||||
|
||||
@@ -49,7 +51,7 @@ public class JavaOptionsProvider implements OptionsProvider {
|
||||
* Use the default options, but override the ones found in additionalOptions.
|
||||
*/
|
||||
public JavaOptionsProvider(Map<String, String> additionalOptions) {
|
||||
options = new ImmutableMap.Builder<String, String>()
|
||||
options = new ImmutableMap.Builder<String, String>()
|
||||
.putAll(options)
|
||||
.putAll(additionalOptions)
|
||||
.build();
|
||||
|
||||
Reference in New Issue
Block a user