fix python flask controller without tag (default_controller)

This commit is contained in:
wing328
2016-10-03 09:32:20 +08:00
parent 40a1879797
commit 4a74e788ec
2 changed files with 13 additions and 5 deletions

View File

@@ -145,10 +145,6 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
}
if(!new java.io.File(controllerPackage + File.separator + defaultController + ".py").exists()) {
//supportingFiles.add(new SupportingFile("controller.mustache",
// controllerPackage,
// defaultController + ".py")
//);
supportingFiles.add(new SupportingFile("__init__.mustache",
controllerPackage,
"__init__.py")
@@ -269,7 +265,7 @@ public class FlaskConnexionCodegen extends DefaultCodegen implements CodegenConf
}
else {
// no tag found, use "default_controller" as the default
String tag = "default_controller";
String tag = "default";
operation.setTags(Arrays.asList(tag));
controllerName = tag + "_controller";
}