import model only if it has import for c#

This commit is contained in:
wing328
2015-07-02 11:18:41 +08:00
parent 488e604207
commit 422da698f6
5 changed files with 8 additions and 7 deletions

View File

@@ -430,6 +430,12 @@ public class DefaultGenerator extends AbstractGenerator implements Generator {
}
operations.put("imports", imports);
// add a flag to indicate whether there's any {{import}}
if (imports.size() > 0) {
operations.put("hasImport", true);
}
config.postProcessOperations(operations);
if (objs.size() > 0) {
List<CodegenOperation> os = (List<CodegenOperation>) objs.get("operation");