mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 03:18:53 +00:00
Merge branch 'swift/enums' of https://github.com/jaz-ah/swagger-codegen into jaz-ah-swift/enums
Conflicts: modules/swagger-codegen/src/main/java/io/swagger/codegen/languages/SwiftCodegen.java
This commit is contained in:
commit
a31f78b454
@ -342,7 +342,7 @@ 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) || toVarName(name).equals(codegenProperty.datatypeWithEnum)) {
|
||||
codegenProperty.datatypeWithEnum = codegenProperty.datatypeWithEnum + "Enum";
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user