made timestamp generation enabled by default

This commit is contained in:
Tony Tam
2016-04-03 14:36:23 -06:00
parent 034ed5d149
commit ee08d16ae5
13 changed files with 17 additions and 19 deletions

View File

@@ -42,6 +42,8 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
protected Boolean serializableModel = false;
protected boolean serializeBigDecimalAsString = false;
protected boolean useRxJava = false;
protected boolean hideGenerationTimestamp = false;
public JavaClientCodegen() {
super();
@@ -99,6 +101,7 @@ public class JavaClientCodegen extends DefaultCodegen implements CodegenConfig {
.SERIALIZE_BIG_DECIMAL_AS_STRING_DESC));
cliOptions.add(CliOption.newBoolean(FULL_JAVA_UTIL, "whether to use fully qualified name for classes under java.util"));
cliOptions.add(CliOption.newBoolean(USE_RX_JAVA, "Whether to use the RxJava adapter with the retrofit2 library."));
cliOptions.add(new CliOption("hideGenerationTimestamp", "hides the timestamp when files were generated"));
supportedLibraries.put(DEFAULT_LIBRARY, "HTTP client: Jersey client 1.18. JSON processing: Jackson 2.4.2");
supportedLibraries.put("feign", "HTTP client: Netflix Feign 8.1.1");

View File

@@ -7,8 +7,6 @@ import java.io.File;
import java.util.*;
public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
boolean showGenerationTimestamp = false;
public JavaJerseyServerCodegen() {
super();
@@ -48,7 +46,6 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
cliOptions.add(library);
cliOptions.add(new CliOption(CodegenConstants.IMPL_FOLDER, CodegenConstants.IMPL_FOLDER_DESC));
cliOptions.add(new CliOption("title", "a title describing the application"));
cliOptions.add(new CliOption("showGenerationTimestamp", "shows the timestamp when files were generated"));
}
@Override
@@ -152,7 +149,7 @@ public class JavaJerseyServerCodegen extends AbstractJavaJAXRSServerCodegen {
co.baseName = basePath;
}
public void showGenerationTimestamp(boolean showGenerationTimestamp) {
this.showGenerationTimestamp = showGenerationTimestamp;
public void hideGenerationTimestamp(boolean hideGenerationTimestamp) {
this.hideGenerationTimestamp = hideGenerationTimestamp;
}
}