From dfabb1503a70275af5e8ecbcb284f2399dec8b05 Mon Sep 17 00:00:00 2001 From: Arun Date: Tue, 15 Oct 2019 11:03:13 +0530 Subject: [PATCH] Add missing keywords in swift (#4153) --- .../openapitools/codegen/languages/SwiftClientCodegen.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java index d4e06cc01a9..7f3b5299887 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/SwiftClientCodegen.java @@ -136,6 +136,7 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig "ErrorResponse", // swift keywords + // https://docs.swift.org/swift-book/ReferenceManual/LexicalStructure.html Section: Keywords and Punctuation "Int", "Int32", "Int64", "Int64", "Float", "Double", "Bool", "Void", "String", "Character", "AnyObject", "class", "Class", "break", "as", "associativity", "deinit", "case", "dynamicType", "convenience", "enum", "continue", "false", "dynamic", "extension", "default", "is", "didSet", "func", "do", "nil", "final", "import", "else", @@ -143,7 +144,8 @@ public class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig "true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol", - "required", "right", "set", "Type", "unowned", "weak", "Data") + "required", "right", "set", "Type", "unowned", "weak", "Data","fileprivate", "open", "rethrows", "defer", + "guard", "repeat", "Any", "catch", "throw", "throws", "try", "indirect", "willSet") ); typeMapping = new HashMap();