Skip to content

Commit dfabb15

Browse files
Arunwing328
authored andcommitted
Add missing keywords in swift (#4153)
1 parent 9c6b94c commit dfabb15

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,14 +136,16 @@ public SwiftClientCodegen() {
136136
"ErrorResponse",
137137

138138
// swift keywords
139+
// https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html Section: Keywords and Punctuation
139140
"Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject",
140141
"class", "Class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue",
141142
"false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else",
142143
"self", "get", "init", "fallthrough", "Self", "infix", "internal", "for", "super", "inout", "let", "if",
143144
"true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol",
144145
"switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional",
145146
"struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol",
146-
"required", "right", "set", "Type", "unowned", "weak", "Data")
147+
"required", "right", "set", "Type", "unowned", "weak", "Data","fileprivate", "open", "rethrows", "defer",
148+
"guard", "repeat", "Any", "catch", "throw", "throws", "try", "indirect", "willSet")
147149
);
148150

149151
typeMapping = new HashMap<String, String>();

0 commit comments

Comments
 (0)