fix for #1042, removed empty / when basePath is null

This commit is contained in:
Tony Tam
2015-08-03 16:47:51 -07:00
parent 55be0330e3
commit 1007534575

View File

@@ -111,10 +111,8 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
}
if (swagger.getBasePath() != null) {
hostBuilder.append(swagger.getBasePath());
} else {
hostBuilder.append("/");
}
String contextPath = swagger.getBasePath() == null ? "/" : swagger.getBasePath();
String contextPath = swagger.getBasePath() == null ? "" : swagger.getBasePath();
String basePath = hostBuilder.toString();