add "Data" as reserved word in swift 2.x, 4.x

This commit is contained in:
wing328 2017-07-24 00:06:11 +08:00
parent f5591232fc
commit 4a8d9c3509
3 changed files with 5 additions and 2 deletions

3
.gitignore vendored
View File

@ -165,3 +165,6 @@ samples/client/petstore/typescript-aurelia/**/dist/
# aspnetcore # aspnetcore
samples/server/petstore/aspnetcore/.vs/ samples/server/petstore/aspnetcore/.vs/
effective.pom effective.pom
# kotlin
samples/client/petstore/kotlin/src/main/kotlin/test/

View File

@ -125,7 +125,7 @@ public class Swift4Codegen extends DefaultCodegen implements CodegenConfig {
"true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol", "true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol",
"switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional",
"struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol",
"required", "right", "set", "Type", "unowned", "weak", "Codable", "Encodable", "Decodable") "required", "right", "set", "Type", "unowned", "weak", "Data", "Codable", "Encodable", "Decodable")
); );
typeMapping = new HashMap<>(); typeMapping = new HashMap<>();

View File

@ -112,7 +112,7 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
"true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol", "true", "lazy", "operator", "in", "COLUMN", "left", "private", "return", "FILE", "mutating", "protocol",
"switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional", "switch", "FUNCTION", "none", "public", "where", "LINE", "nonmutating", "static", "while", "optional",
"struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol", "struct", "override", "subscript", "postfix", "typealias", "precedence", "var", "prefix", "Protocol",
"required", "right", "set", "Type", "unowned", "weak") "required", "right", "set", "Type", "unowned", "weak", "Data")
); );
typeMapping = new HashMap<String, String>(); typeMapping = new HashMap<String, String>();