Theres an identifier/property named “extension” on some of our DTOs: Phone, Fax and MyProfileBase64PhotoUpdateRequest classes for example. This generates an issue at compile time as “extension” is a Swift keyword.
I’m also getting the following errors:
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:9786:22: error: declarations in extensions cannot override yet
public class var typeName:String { return "MyProfileUpdateRequest" }
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:5132:22: note: overridden declaration is here
public class var typeName:String { return "UpdateableProfile" }
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:9784:1: error: type 'MyProfileUpdateRequest' does not conform to protocol 'Convertible'
extension MyProfileUpdateRequest : JsonSerializable
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/JsonServiceClient.swift:1057:16: note: multiple matching properties named 'typeName' with type 'String'
static var typeName:String { get }
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:9786:22: note: candidate exactly matches
public class var typeName:String { return "MyProfileUpdateRequest" }
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:5132:22: note: candidate exactly matches
public class var typeName:String { return "UpdateableProfile" }
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:9819:23: error: declarations in extensions cannot override yet
public class func fromObject(any:AnyObject) -> MyProfileUpdateRequest? {
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:5165:23: note: overridden declaration is here
public class func fromObject(any:AnyObject) -> UpdateableProfile? {
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/JsonServiceClient.swift:1058:17: note: multiple matching functions named 'fromObject' with type '(AnyObject) -> MyProfileUpdateRequest.T?'
static func fromObject(any:AnyObject) -> T?
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:9819:23: note: candidate exactly matches [with T = MyProfileUpdateRequest]
public class func fromObject(any:AnyObject) -> MyProfileUpdateRequest? {
^
/Users/mjc/Documents/projects/aao-nfmobi-ios/src/memberapp/memberapp/AAOTestingApi.dtos.swift:5165:23: note: candidate exactly matches [with T = UpdateableProfile]
public class func fromObject(any:AnyObject) -> UpdateableProfile? {
We can’t really change our API, as it’s used in production right now, supporting some mobile apps and other applications. Any recommendations to get around these issues?
You can access the generated DTO here: http://nf.aaoinfo.org/nfaaotest/mapi/api/types/swift