* update versions of dependencies on swift4 and swift3
* change syntax for swift4
* run petstore script
* change enum case from UpperCamel to lowerCamel
* remove unneeded break statements
* avoid wrapping conditionals in parentheses
* avoid force casting
* run pod update on petstore/swift4/rxswift
* update project for swift 4
* run swift4-petstore-all.sh
* fix compile error
* avoid use iso8601 date strategy for encoder / decoder
* resolve file references
* Add addiitional files from upstream
* Remove mis-added files
* Add additional swift4 initializer for initializing model object with properties.
This change fixes this issue: https://github.com/swagger-api/swagger-codegen/issues/6641
It adds an additional initializer which allows model objects to be initialized using the properties. For exxample, if we had this model:
"ErrorInfo": {
"type": "object",
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"type": "string"
}
}
},
"description": "Example Error object"
},
This we generate an initializer for this model object like this:
public init(code: Int?, message: String?, details: [String]?) {
self.code = code
self.message = message
self.details = details
}
* Add hasVars checks around initializers and re-run all scripts to re-generate
This is the equivalent change in the swift4 module which was made in the swift3 module in this PR:
https://github.com/swagger-api/swagger-codegen/pull/6274
This updates AlamofireImplementations.mustache to handle when the response is an URL. It also makes changes in the generated sample code for:
* default configuration (no promisekit or rxswift)
* promisekit
* rxswift
Also, in order to build, the generated code needed to be updated with the change in CodableHelper which changes dataDecodingStrategy to ".base64" from its previous definition in earlier Xcode 9 betas.
*
* Add a swift4 client generator
* Updates per review comments:
- Changed Alamofire dependency from 4.0 to 4.5
- Added "Codable", "Encodable", and "Decodable" to list of reserved words in generator
- Ran "pod update" in default, promisekit, and rxswift samples test projects