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