forked from loafle/openapi-generator-original
Append reserved swift enum type with "Enum"
This commit is contained in:
@@ -337,7 +337,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
|
||||
// Swift compiler will generate an error
|
||||
if (isReservedWord(codegenProperty.datatypeWithEnum) ||
|
||||
name.equals(codegenProperty.datatypeWithEnum)) {
|
||||
codegenProperty.datatypeWithEnum = escapeReservedWord(codegenProperty.datatypeWithEnum);
|
||||
codegenProperty.datatypeWithEnum = codegenProperty.datatypeWithEnum + "Enum";
|
||||
}
|
||||
}
|
||||
return codegenProperty;
|
||||
|
||||
Reference in New Issue
Block a user