forked from loafle/openapi-generator-original
import models fix for csharp (#6155)
This commit is contained in:
committed by
wing328
parent
2540db8adf
commit
eea797d181
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user