diff --git a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java index f1be1368a9a..f60953c48b7 100644 --- a/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java +++ b/modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java @@ -335,10 +335,9 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig { // Ensure that the enum type doesn't match a reserved word or // the variable name doesn't match the generated enum type or the // Swift compiler will generate an error - if (isReservedWord(codegenProperty.datatypeWithEnum) || - name.equals(codegenProperty.datatypeWithEnum)) { + if (isReservedWord(codegenProperty.datatypeWithEnum) || name.equals(codegenProperty.datatypeWithEnum)) { codegenProperty.datatypeWithEnum = codegenProperty.datatypeWithEnum + "Enum"; - } + } } return codegenProperty; }