added bigDecimalAsString option to allow serializing with strings

This commit is contained in:
Tony Tam
2015-12-30 12:32:37 -08:00
parent ac7856d009
commit 1cd54ee685
7 changed files with 68 additions and 32 deletions

View File

@@ -4,8 +4,6 @@ import io.swagger.codegen.CodegenConfig;
import io.swagger.codegen.java.JavaClientOptionsTest;
import io.swagger.codegen.languages.JavaInflectorServerCodegen;
import io.swagger.codegen.options.JavaInflectorServerOptionsProvider;
import io.swagger.codegen.options.JavaOptionsProvider;
import mockit.Expectations;
import mockit.Tested;
@@ -50,6 +48,8 @@ public class JavaInflectorServerOptionsTest extends JavaClientOptionsTest {
times = 1;
clientCodegen.setFullJavaUtil(Boolean.valueOf(JavaInflectorServerOptionsProvider.FULL_JAVA_UTIL_VALUE));
times = 1;
clientCodegen.setSerializeBigDecimalAsString(true);
times = 1;
}};
}
}

View File

@@ -38,6 +38,7 @@ public class JavaOptionsProvider implements OptionsProvider {
.put(CodegenConstants.SERIALIZABLE_MODEL, SERIALIZABLE_MODEL_VALUE)
.put(JavaClientCodegen.FULL_JAVA_UTIL, FULL_JAVA_UTIL_VALUE)
.put(CodegenConstants.LIBRARY, LIBRARY_VALUE)
.put(CodegenConstants.SERIALIZE_BIG_DECIMAL_AS_STRING, "true")
.build();
}