import models fix for csharp (#6155)

This commit is contained in:
Georgy Grigoryev
2017-07-25 11:04:30 +04:00
committed by wing328
parent 2540db8adf
commit eea797d181

View File

@@ -579,6 +579,11 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
@Override
public String toModelName(String name) {
// We need to check if import-mapping has a different model for this class, so we use it
// instead of the auto-generated one.
if (importMapping.containsKey(name)) {
return importMapping.get(name);
}
if (!StringUtils.isEmpty(modelNamePrefix)) {
name = modelNamePrefix + "_" + name;
}