fix issue with java feign client

This commit is contained in:
wing328
2016-07-07 15:29:13 +08:00
parent d4f9eefa94
commit c5cc0bbb2a
214 changed files with 7804 additions and 21232 deletions

View File

@@ -78,6 +78,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen {
writeOptional(outputFolder, new SupportingFile("pom.mustache", "", "pom.xml"));
writeOptional(outputFolder, new SupportingFile("README.mustache", "", "README.md"));
writeOptional(outputFolder, new SupportingFile("build.gradle.mustache", "", "build.gradle"));
writeOptional(outputFolder, new SupportingFile("build.sbt.mustache", "", "build.sbt"));
writeOptional(outputFolder, new SupportingFile("settings.gradle.mustache", "", "settings.gradle"));
writeOptional(outputFolder, new SupportingFile("gradle.properties.mustache", "", "gradle.properties"));
writeOptional(outputFolder, new SupportingFile("manifest.mustache", projectFolder, "AndroidManifest.xml"));
@@ -97,14 +98,6 @@ public class JavaClientCodegen extends AbstractJavaCodegen {
supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh"));
supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore"));
if (!StringUtils.isEmpty(getLibrary())) {
// set library to okhttp-gson as default
setLibrary("okhttp-gson");
//TODO: add sbt support to default client
supportingFiles.add(new SupportingFile("build.sbt.mustache", "", "build.sbt"));
}
//TODO: add doc to retrofit1 and feign
if ( "feign".equals(getLibrary()) || "retrofit".equals(getLibrary()) ){
modelDocTemplateFiles.remove("model_doc.mustache");
@@ -139,7 +132,7 @@ public class JavaClientCodegen extends AbstractJavaCodegen {
} else if("jersey1".equals(getLibrary())) {
additionalProperties.put("jackson", "true");
} else {
LOGGER.error("Unknown library option (-l/--library): " + StringUtils.isEmpty(getLibrary()));
LOGGER.error("Unknown library option (-l/--library): " + getLibrary());
}
}