Merge branch 'fix-model-package' of https://github.com/Ragnis/swagger-codegen into Ragnis-fix-model-package

This commit is contained in:
wing328 2016-10-19 16:38:13 +08:00
commit b688a7f443

View File

@ -183,7 +183,12 @@ public class Qt5CPPGenerator extends DefaultCodegen implements CodegenConfig {
} else if (systemIncludes.contains(name)) {
return "#include <" + name + ">";
}
return "#include \"" + name + ".h\"";
String folder = modelPackage().replace("::", File.separator);
if (!folder.isEmpty())
folder += File.separator;
return "#include \"" + folder + name + ".h\"";
}
/**
@ -203,7 +208,7 @@ public class Qt5CPPGenerator extends DefaultCodegen implements CodegenConfig {
*/
@Override
public String modelFileFolder() {
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace('.', File.separatorChar);
return outputFolder + "/" + sourceFolder + "/" + modelPackage().replace("::", File.separator);
}
/**