[Swift4]Update templates for swift 4 (#6921)

* 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
This commit is contained in:
Daiki Matsudate
2017-11-21 12:33:52 +09:00
committed by William Cheng
parent b06ccec11e
commit a5e4abe5ec
379 changed files with 5282 additions and 8237 deletions

View File

@@ -1 +1 @@
2.3.0-SNAPSHOT
unset

View File

@@ -1,2 +1,2 @@
github "Alamofire/Alamofire" >= 3.1.0
github "mxcl/PromiseKit" >=1.5.3
github "Alamofire/Alamofire" ~> 4.5.0
github "mxcl/PromiseKit" ~> 4.4

View File

@@ -1,5 +1,5 @@
//
// AnotherfakeAPI.swift
// AnotherFakeAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
@@ -11,7 +11,7 @@ import PromiseKit
open class AnotherfakeAPI {
open class AnotherFakeAPI {
/**
To test special tags

View File

@@ -540,6 +540,58 @@ open class FakeAPI {
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false, headers: headerParameters)
}
/**
test inline additionalProperties
- parameter param: (body) request body
- parameter completion: completion handler to receive the data and the error objects
*/
open class func testInlineAdditionalProperties(param: Any, completion: @escaping ((_ error: Error?) -> Void)) {
testInlineAdditionalPropertiesWithRequestBuilder(param: param).execute { (response, error) -> Void in
completion(error);
}
}
/**
test inline additionalProperties
- parameter param: (body) request body
- returns: Promise<Void>
*/
open class func testInlineAdditionalProperties( param: Any) -> Promise<Void> {
let deferred = Promise<Void>.pending()
testInlineAdditionalProperties(param: param) { error in
if let error = error {
deferred.reject(error)
} else {
deferred.fulfill()
}
}
return deferred.promise
}
/**
test inline additionalProperties
- POST /fake/inline-additionalProperties
-
- parameter param: (body) request body
- returns: RequestBuilder<Void>
*/
open class func testInlineAdditionalPropertiesWithRequestBuilder(param: Any) -> RequestBuilder<Void> {
let path = "/fake/inline-additionalProperties"
let URLString = PetstoreClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: param)
let url = NSURLComponents(string: URLString)
let requestBuilder: RequestBuilder<Void>.Type = PetstoreClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: true)
}
/**
test json serialization of form data

View File

@@ -1,5 +1,5 @@
//
// Fake_classname_tags123API.swift
// FakeClassnameTags123API.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
@@ -11,7 +11,7 @@ import PromiseKit
open class Fake_classname_tags123API {
open class FakeClassnameTags123API {
/**
To test class name in snake case

View File

@@ -1,67 +0,0 @@
//
// FakeclassnametagsAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Alamofire
import PromiseKit
open class FakeclassnametagsAPI {
/**
To test class name in snake case
- parameter body: (body) client model
- parameter completion: completion handler to receive the data and the error objects
*/
open class func testClassname(body: Client, completion: @escaping ((_ data: Client?,_ error: Error?) -> Void)) {
testClassnameWithRequestBuilder(body: body).execute { (response, error) -> Void in
completion(response?.body, error);
}
}
/**
To test class name in snake case
- parameter body: (body) client model
- returns: Promise<Client>
*/
open class func testClassname( body: Client) -> Promise<Client> {
let deferred = Promise<Client>.pending()
testClassname(body: body) { data, error in
if let error = error {
deferred.reject(error)
} else {
deferred.fulfill(data!)
}
}
return deferred.promise
}
/**
To test class name in snake case
- PATCH /fake_classname_test
- examples: [{contentType=application/json, example={
"client" : "aeiou"
}}]
- parameter body: (body) client model
- returns: RequestBuilder<Client>
*/
open class func testClassnameWithRequestBuilder(body: Client) -> RequestBuilder<Client> {
let path = "/fake_classname_test"
let URLString = PetstoreClientAPI.basePath + path
let parameters = JSONEncodingHelper.encodingParameters(forEncodableObject: body)
let convertedParameters = APIHelper.convertBoolToString(parameters)
let requestBuilder: RequestBuilder<Client>.Type = PetstoreClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "PATCH", URLString: URLString, parameters: convertedParameters, isBody: true)
}
}

View File

@@ -77,16 +77,12 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
else {
mpForm.append(fileURL, withName: k)
}
break
case let string as String:
mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
break
case let number as NSNumber:
mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
break
default:
fatalError("Unprocessable value \(v) with key \(k)")
break
}
}
}, to: URLString, method: xMethod!, headers: nil, encodingCompletion: { encodingResult in
@@ -97,7 +93,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
}
self.processRequest(request: upload, managerId, completion)
case .failure(let encodingError):
completion(nil, ErrorResponse.Error(415, nil, encodingError))
completion(nil, ErrorResponse.error(415, nil, encodingError))
}
})
} else {
@@ -129,7 +125,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
if stringResponse.result.isFailure {
completion(
nil,
ErrorResponse.Error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!)
ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!)
)
return
}
@@ -186,9 +182,9 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
)
} catch let requestParserError as DownloadException {
completion(nil, ErrorResponse.Error(400, dataResponse.data, requestParserError))
completion(nil, ErrorResponse.error(400, dataResponse.data, requestParserError))
} catch let error {
completion(nil, ErrorResponse.Error(400, dataResponse.data, error))
completion(nil, ErrorResponse.error(400, dataResponse.data, error))
}
return
})
@@ -199,7 +195,7 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
if voidResponse.result.isFailure {
completion(
nil,
ErrorResponse.Error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!)
ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!)
)
return
}
@@ -215,10 +211,10 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
validatedRequest.responseData(completionHandler: { (dataResponse) in
cleanupRequest()
if (dataResponse.result.isFailure) {
if dataResponse.result.isFailure {
completion(
nil,
ErrorResponse.Error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)
ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)
)
return
}
@@ -331,7 +327,7 @@ open class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilde
if stringResponse.result.isFailure {
completion(
nil,
ErrorResponse.Error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!)
ErrorResponse.error(stringResponse.response?.statusCode ?? 500, stringResponse.data, stringResponse.result.error as Error!)
)
return
}
@@ -351,7 +347,7 @@ open class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilde
if voidResponse.result.isFailure {
completion(
nil,
ErrorResponse.Error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!)
ErrorResponse.error(voidResponse.response?.statusCode ?? 500, voidResponse.data, voidResponse.result.error!)
)
return
}
@@ -367,10 +363,10 @@ open class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilde
validatedRequest.responseData(completionHandler: { (dataResponse) in
cleanupRequest()
if (dataResponse.result.isFailure) {
if dataResponse.result.isFailure {
completion(
nil,
ErrorResponse.Error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)
ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!)
)
return
}
@@ -388,17 +384,17 @@ open class AlamofireDecodableRequestBuilder<T:Decodable>: AlamofireRequestBuilde
cleanupRequest()
guard dataResponse.result.isSuccess else {
completion(nil, ErrorResponse.Error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!))
completion(nil, ErrorResponse.error(dataResponse.response?.statusCode ?? 500, dataResponse.data, dataResponse.result.error!))
return
}
guard let data = dataResponse.data, !data.isEmpty else {
completion(nil, ErrorResponse.Error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse))
completion(nil, ErrorResponse.error(-1, nil, AlamofireDecodableRequestBuilderError.emptyDataResponse))
return
}
guard let httpResponse = dataResponse.response else {
completion(nil, ErrorResponse.Error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse))
completion(nil, ErrorResponse.error(-2, nil, AlamofireDecodableRequestBuilderError.nilHTTPResponse))
return
}

View File

@@ -22,9 +22,12 @@ open class CodableHelper {
decoder.dateDecodingStrategy = .formatted(df)
} else {
decoder.dataDecodingStrategy = .base64
if #available(iOS 10.0, *) {
decoder.dateDecodingStrategy = .iso8601
}
let formatter = DateFormatter()
formatter.calendar = Calendar(identifier: .iso8601)
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
decoder.dateDecodingStrategy = .formatted(formatter)
}
do {
@@ -45,9 +48,12 @@ open class CodableHelper {
encoder.outputFormatting = .prettyPrinted
}
encoder.dataEncodingStrategy = .base64
if #available(iOS 10.0, *) {
encoder.dateEncodingStrategy = .iso8601
}
let formatter = DateFormatter()
formatter.calendar = Calendar(identifier: .iso8601)
formatter.locale = Locale(identifier: "en_US_POSIX")
formatter.timeZone = TimeZone(secondsFromGMT: 0)
formatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSSXXXXX"
encoder.dateEncodingStrategy = .formatted(formatter)
do {
returnedData = try encoder.encode(value)

View File

@@ -54,7 +54,7 @@ extension Dictionary: JSONEncodable {
func encodeToJSON() -> Any {
var dictionary = [AnyHashable: Any]()
for (key, value) in self {
dictionary[key as! NSObject] = encodeIfPossible(value)
dictionary[key] = encodeIfPossible(value)
}
return dictionary as Any
}

View File

@@ -11,7 +11,7 @@ protocol JSONEncodable {
}
public enum ErrorResponse : Error {
case Error(Int, Data?, Error)
case error(Int, Data?, Error)
}
open class Response<T> {
@@ -28,8 +28,8 @@ open class Response<T> {
public convenience init(response: HTTPURLResponse, body: T?) {
let rawHeader = response.allHeaderFields
var header = [String:String]()
for (key, value) in rawHeader {
header[key as! String] = value as? String
for case let (key, value) as (String, String) in rawHeader {
header[key] = value
}
self.init(statusCode: response.statusCode, header: header, body: body)
}

View File

@@ -15,10 +15,12 @@ open class AdditionalPropertiesClass: Codable {
public var mapOfMapProperty: [String:[String:String]]?
public init(mapProperty: [String:String]?, mapOfMapProperty: [String:[String:String]]?) {
self.mapProperty = mapProperty
self.mapOfMapProperty = mapOfMapProperty
}
// Encodable protocol methods

View File

@@ -15,10 +15,12 @@ open class Animal: Codable {
public var color: String?
public init(className: String, color: String?) {
self.className = className
self.color = color
}
// Encodable protocol methods

View File

@@ -16,11 +16,13 @@ open class ApiResponse: Codable {
public var message: String?
public init(code: Int?, type: String?, message: String?) {
self.code = code
self.type = type
self.message = message
}
// Encodable protocol methods

View File

@@ -14,9 +14,11 @@ open class ArrayOfArrayOfNumberOnly: Codable {
public var arrayArrayNumber: [[Double]]?
public init(arrayArrayNumber: [[Double]]?) {
self.arrayArrayNumber = arrayArrayNumber
}
// Encodable protocol methods
@@ -24,7 +26,7 @@ open class ArrayOfArrayOfNumberOnly: Codable {
var container = encoder.container(keyedBy: String.self)
try container.encodeArrayIfPresent(arrayArrayNumber, forKey: "ArrayArrayNumber")
try container.encodeIfPresent(arrayArrayNumber, forKey: "ArrayArrayNumber")
}
// Decodable protocol methods
@@ -32,7 +34,7 @@ open class ArrayOfArrayOfNumberOnly: Codable {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
arrayArrayNumber = try container.decodeArrayIfPresent([Double].self, forKey: "ArrayArrayNumber")
arrayArrayNumber = try container.decodeIfPresent([[Double]].self, forKey: "ArrayArrayNumber")
}
}

View File

@@ -14,9 +14,11 @@ open class ArrayOfNumberOnly: Codable {
public var arrayNumber: [Double]?
public init(arrayNumber: [Double]?) {
self.arrayNumber = arrayNumber
}
// Encodable protocol methods
@@ -24,7 +26,7 @@ open class ArrayOfNumberOnly: Codable {
var container = encoder.container(keyedBy: String.self)
try container.encodeArrayIfPresent(arrayNumber, forKey: "ArrayNumber")
try container.encodeIfPresent(arrayNumber, forKey: "ArrayNumber")
}
// Decodable protocol methods
@@ -32,7 +34,7 @@ open class ArrayOfNumberOnly: Codable {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
arrayNumber = try container.decodeArrayIfPresent(Double.self, forKey: "ArrayNumber")
arrayNumber = try container.decodeIfPresent([Double].self, forKey: "ArrayNumber")
}
}

View File

@@ -16,11 +16,13 @@ open class ArrayTest: Codable {
public var arrayArrayOfModel: [[ReadOnlyFirst]]?
public init(arrayOfString: [String]?, arrayArrayOfInteger: [[Int64]]?, arrayArrayOfModel: [[ReadOnlyFirst]]?) {
self.arrayOfString = arrayOfString
self.arrayArrayOfInteger = arrayArrayOfInteger
self.arrayArrayOfModel = arrayArrayOfModel
}
// Encodable protocol methods
@@ -28,9 +30,9 @@ open class ArrayTest: Codable {
var container = encoder.container(keyedBy: String.self)
try container.encodeArrayIfPresent(arrayOfString, forKey: "array_of_string")
try container.encodeArrayIfPresent(arrayArrayOfInteger, forKey: "array_array_of_integer")
try container.encodeArrayIfPresent(arrayArrayOfModel, forKey: "array_array_of_model")
try container.encodeIfPresent(arrayOfString, forKey: "array_of_string")
try container.encodeIfPresent(arrayArrayOfInteger, forKey: "array_array_of_integer")
try container.encodeIfPresent(arrayArrayOfModel, forKey: "array_array_of_model")
}
// Decodable protocol methods
@@ -38,9 +40,9 @@ open class ArrayTest: Codable {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
arrayOfString = try container.decodeArrayIfPresent(String.self, forKey: "array_of_string")
arrayArrayOfInteger = try container.decodeArrayIfPresent([Int64].self, forKey: "array_array_of_integer")
arrayArrayOfModel = try container.decodeArrayIfPresent([ReadOnlyFirst].self, forKey: "array_array_of_model")
arrayOfString = try container.decodeIfPresent([String].self, forKey: "array_of_string")
arrayArrayOfInteger = try container.decodeIfPresent([[Int64]].self, forKey: "array_array_of_integer")
arrayArrayOfModel = try container.decodeIfPresent([[ReadOnlyFirst]].self, forKey: "array_array_of_model")
}
}

View File

@@ -20,6 +20,7 @@ open class Capitalization: Codable {
public var ATT_NAME: String?
public init(smallCamel: String?, capitalCamel: String?, smallSnake: String?, capitalSnake: String?, sCAETHFlowPoints: String?, ATT_NAME: String?) {
self.smallCamel = smallCamel
self.capitalCamel = capitalCamel
@@ -28,6 +29,7 @@ open class Capitalization: Codable {
self.sCAETHFlowPoints = sCAETHFlowPoints
self.ATT_NAME = ATT_NAME
}
// Encodable protocol methods

View File

@@ -14,9 +14,7 @@ open class Cat: Animal {
public var declawed: Bool?
public init(declawed: Bool?) {
self.declawed = declawed
}
// Encodable protocol methods
@@ -29,10 +27,11 @@ open class Cat: Animal {
// Decodable protocol methods
public override required init(from decoder: Decoder) throws {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
declawed = try container.decodeIfPresent(Bool.self, forKey: "declawed")
try super.init(from: decoder)
}
}

View File

@@ -15,10 +15,12 @@ open class Category: Codable {
public var name: String?
public init(id: Int64?, name: String?) {
self.id = id
self.name = name
}
// Encodable protocol methods

View File

@@ -15,9 +15,11 @@ open class ClassModel: Codable {
public var _class: String?
public init(_class: String?) {
self._class = _class
}
// Encodable protocol methods

View File

@@ -14,9 +14,11 @@ open class Client: Codable {
public var client: String?
public init(client: String?) {
self.client = client
}
// Encodable protocol methods

View File

@@ -14,9 +14,7 @@ open class Dog: Animal {
public var breed: String?
public init(breed: String?) {
self.breed = breed
}
// Encodable protocol methods
@@ -29,10 +27,11 @@ open class Dog: Animal {
// Decodable protocol methods
public override required init(from decoder: Decoder) throws {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
breed = try container.decodeIfPresent(String.self, forKey: "breed")
try super.init(from: decoder)
}
}

View File

@@ -23,10 +23,12 @@ open class EnumArrays: Codable {
public var arrayEnum: [ArrayEnum]?
public init(justSymbol: JustSymbol?, arrayEnum: [ArrayEnum]?) {
self.justSymbol = justSymbol
self.arrayEnum = arrayEnum
}
// Encodable protocol methods
@@ -35,7 +37,7 @@ open class EnumArrays: Codable {
var container = encoder.container(keyedBy: String.self)
try container.encodeIfPresent(justSymbol, forKey: "just_symbol")
try container.encodeArrayIfPresent(arrayEnum, forKey: "array_enum")
try container.encodeIfPresent(arrayEnum, forKey: "array_enum")
}
// Decodable protocol methods
@@ -43,8 +45,8 @@ open class EnumArrays: Codable {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
justSymbol = try container.decodeIfPresent(String.self, forKey: "just_symbol")
arrayEnum = try container.decodeArrayIfPresent(String.self, forKey: "array_enum")
justSymbol = try container.decodeIfPresent(JustSymbol.self, forKey: "just_symbol")
arrayEnum = try container.decodeIfPresent([ArrayEnum].self, forKey: "array_enum")
}
}

View File

@@ -30,12 +30,14 @@ open class EnumTest: Codable {
public var outerEnum: OuterEnum?
public init(enumString: EnumString?, enumInteger: EnumInteger?, enumNumber: EnumNumber?, outerEnum: OuterEnum?) {
self.enumString = enumString
self.enumInteger = enumInteger
self.enumNumber = enumNumber
self.outerEnum = outerEnum
}
// Encodable protocol methods
@@ -54,9 +56,9 @@ open class EnumTest: Codable {
public required init(from decoder: Decoder) throws {
let container = try decoder.container(keyedBy: String.self)
enumString = try container.decodeIfPresent(String.self, forKey: "enum_string")
enumInteger = try container.decodeIfPresent(Int.self, forKey: "enum_integer")
enumNumber = try container.decodeIfPresent(Double.self, forKey: "enum_number")
enumString = try container.decodeIfPresent(EnumString.self, forKey: "enum_string")
enumInteger = try container.decodeIfPresent(EnumInteger.self, forKey: "enum_integer")
enumNumber = try container.decodeIfPresent(EnumNumber.self, forKey: "enum_number")
outerEnum = try container.decodeIfPresent(OuterEnum.self, forKey: "outerEnum")
}
}

View File

@@ -26,6 +26,7 @@ open class FormatTest: Codable {
public var password: String
public init(integer: Int?, int32: Int?, int64: Int64?, number: Double, float: Float?, double: Double?, string: String?, byte: Data, binary: Data?, date: Date, dateTime: Date?, uuid: UUID?, password: String) {
self.integer = integer
self.int32 = int32
@@ -41,6 +42,7 @@ open class FormatTest: Codable {
self.uuid = uuid
self.password = password
}
// Encodable protocol methods

View File

@@ -15,10 +15,12 @@ open class HasOnlyReadOnly: Codable {
public var foo: String?
public init(bar: String?, foo: String?) {
self.bar = bar
self.foo = foo
}
// Encodable protocol methods

View File

@@ -14,9 +14,11 @@ open class List: Codable {
public var _123List: String?
public init(_123List: String?) {
self._123List = _123List
}
// Encodable protocol methods

View File

@@ -19,10 +19,12 @@ open class MapTest: Codable {
public var mapOfEnumString: [String:String]?
public init(mapMapOfString: [String:[String:String]]?, mapOfEnumString: [String:String]?) {
self.mapMapOfString = mapMapOfString
self.mapOfEnumString = mapOfEnumString
}
// Encodable protocol methods

View File

@@ -16,11 +16,13 @@ open class MixedPropertiesAndAdditionalPropertiesClass: Codable {
public var map: [String:Animal]?
public init(uuid: UUID?, dateTime: Date?, map: [String:Animal]?) {
self.uuid = uuid
self.dateTime = dateTime
self.map = map
}
// Encodable protocol methods

View File

@@ -16,10 +16,12 @@ open class Model200Response: Codable {
public var _class: String?
public init(name: Int?, _class: String?) {
self.name = name
self._class = _class
}
// Encodable protocol methods

View File

@@ -18,12 +18,14 @@ open class Name: Codable {
public var _123Number: Int?
public init(name: Int, snakeCase: Int?, property: String?, _123Number: Int?) {
self.name = name
self.snakeCase = snakeCase
self.property = property
self._123Number = _123Number
}
// Encodable protocol methods

View File

@@ -14,9 +14,11 @@ open class NumberOnly: Codable {
public var justNumber: Double?
public init(justNumber: Double?) {
self.justNumber = justNumber
}
// Encodable protocol methods

View File

@@ -25,6 +25,7 @@ open class Order: Codable {
public var complete: Bool?
public init(id: Int64?, petId: Int64?, quantity: Int?, shipDate: Date?, status: Status?, complete: Bool?) {
self.id = id
self.petId = petId
@@ -33,6 +34,7 @@ open class Order: Codable {
self.status = status
self.complete = complete
}
// Encodable protocol methods
@@ -57,7 +59,7 @@ open class Order: Codable {
petId = try container.decodeIfPresent(Int64.self, forKey: "petId")
quantity = try container.decodeIfPresent(Int.self, forKey: "quantity")
shipDate = try container.decodeIfPresent(Date.self, forKey: "shipDate")
status = try container.decodeIfPresent(String.self, forKey: "status")
status = try container.decodeIfPresent(Status.self, forKey: "status")
complete = try container.decodeIfPresent(Bool.self, forKey: "complete")
}
}

View File

@@ -13,6 +13,7 @@ open class OuterBoolean: Codable {
// Encodable protocol methods

View File

@@ -16,11 +16,13 @@ open class OuterComposite: Codable {
public var myBoolean: OuterBoolean?
public init(myNumber: OuterNumber?, myString: OuterString?, myBoolean: OuterBoolean?) {
self.myNumber = myNumber
self.myString = myString
self.myBoolean = myBoolean
}
// Encodable protocol methods

View File

@@ -13,6 +13,7 @@ open class OuterNumber: Codable {
// Encodable protocol methods

View File

@@ -13,6 +13,7 @@ open class OuterString: Codable {
// Encodable protocol methods

View File

@@ -25,6 +25,7 @@ open class Pet: Codable {
public var status: Status?
public init(id: Int64?, category: Category?, name: String, photoUrls: [String], tags: [Tag]?, status: Status?) {
self.id = id
self.category = category
@@ -33,6 +34,7 @@ open class Pet: Codable {
self.tags = tags
self.status = status
}
// Encodable protocol methods
@@ -43,8 +45,8 @@ open class Pet: Codable {
try container.encodeIfPresent(id, forKey: "id")
try container.encodeIfPresent(category, forKey: "category")
try container.encode(name, forKey: "name")
try container.encodeArray(photoUrls, forKey: "photoUrls")
try container.encodeArrayIfPresent(tags, forKey: "tags")
try container.encode(photoUrls, forKey: "photoUrls")
try container.encodeIfPresent(tags, forKey: "tags")
try container.encodeIfPresent(status, forKey: "status")
}
@@ -56,9 +58,9 @@ open class Pet: Codable {
id = try container.decodeIfPresent(Int64.self, forKey: "id")
category = try container.decodeIfPresent(Category.self, forKey: "category")
name = try container.decode(String.self, forKey: "name")
photoUrls = try container.decodeArray(String.self, forKey: "photoUrls")
tags = try container.decodeArrayIfPresent(Tag.self, forKey: "tags")
status = try container.decodeIfPresent(String.self, forKey: "status")
photoUrls = try container.decode([String].self, forKey: "photoUrls")
tags = try container.decodeIfPresent([Tag].self, forKey: "tags")
status = try container.decodeIfPresent(Status.self, forKey: "status")
}
}

View File

@@ -15,10 +15,12 @@ open class ReadOnlyFirst: Codable {
public var baz: String?
public init(bar: String?, baz: String?) {
self.bar = bar
self.baz = baz
}
// Encodable protocol methods

View File

@@ -15,9 +15,11 @@ open class Return: Codable {
public var _return: Int?
public init(_return: Int?) {
self._return = _return
}
// Encodable protocol methods

View File

@@ -14,9 +14,11 @@ open class SpecialModelName: Codable {
public var specialPropertyName: Int64?
public init(specialPropertyName: Int64?) {
self.specialPropertyName = specialPropertyName
}
// Encodable protocol methods

View File

@@ -15,10 +15,12 @@ open class Tag: Codable {
public var name: String?
public init(id: Int64?, name: String?) {
self.id = id
self.name = name
}
// Encodable protocol methods

View File

@@ -22,6 +22,7 @@ open class User: Codable {
public var userStatus: Int?
public init(id: Int64?, username: String?, firstName: String?, lastName: String?, email: String?, password: String?, phone: String?, userStatus: Int?) {
self.id = id
self.username = username
@@ -32,6 +33,7 @@ open class User: Codable {
self.phone = phone
self.userStatus = userStatus
}
// Encodable protocol methods

View File

@@ -93,11 +93,11 @@
C9004CA15837C724215DE3E1A7AB42AB /* Capitalization.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0A482A15F21B4BC206B31E7A0FAB79F /* Capitalization.swift */; };
CAA786E247A67408ED8FDDD3BD9EACC3 /* when.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E9E772008F75FBB98AEE83B59F519A9 /* when.m */; };
CB6D60925223897FFA2662667DF83E8A /* Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 714D784CFA6CB99C3B07B03487960BE0 /* Response.swift */; };
D5275BCBC0725D755D5945A9AB6C5A40 /* FakeclassnametagsAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85A2666A7F91E968D48E2EEC1623BB02 /* FakeclassnametagsAPI.swift */; };
D54935D8A773E7BC8DED0861487D5CEB /* OuterBoolean.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21A143975CF52EBFEF79A307CC7CB00E /* OuterBoolean.swift */; };
D54B91CA1FC091E900319969 /* FakeClassnameTags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = D54B91C81FC091E900319969 /* FakeClassnameTags123API.swift */; };
D54B91CB1FC091E900319969 /* AnotherfakeAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = D54B91C91FC091E900319969 /* AnotherfakeAPI.swift */; };
D6184AB54A12F4F580FE7766FFD1A491 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22932972F4F492160D4694C01CAF311D /* Promise.swift */; };
D9FEE02D3C00097A882DCF9AF60C4FDC /* FormatTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9776B33259DFB803A3E6D9573FA3DE3E /* FormatTest.swift */; };
DBC481AC7EB3A4F2E547F52BAF547922 /* Fake_classname_tags123API.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AE3690E05FA4B6B3A8600FCA1631D8C /* Fake_classname_tags123API.swift */; };
DBFDFCF61E2F2C7A49FD50B9222E3495 /* Category.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7417953898146193F86A165CD5F3AF4A /* Category.swift */; };
DDF666793202988950DA52A8C528C076 /* Model200Response.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3617A5AF85A2814F852C73FD5D575262 /* Model200Response.swift */; };
E52BCAD4A070EEAA1EA08F2D299F4EDB /* UserAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = 158D0513D0844E7FE6AEFAEE70E88618 /* UserAPI.swift */; };
@@ -156,20 +156,20 @@
/* End PBXContainerItemProxy section */
/* Begin PBXFileReference section */
00ACB4396DD1B4E4539E4E81C1D7A14E /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = "<group>"; };
00ACB4396DD1B4E4539E4E81C1D7A14E /* Pods-SwaggerClientTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwaggerClientTests.modulemap"; sourceTree = "<group>"; };
02E62B78D97471D708B23605FCAA9EA1 /* Tag.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tag.swift; sourceTree = "<group>"; };
02F28E719AA874BE9213D6CF8CE7E36B /* Pods-SwaggerClientTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwaggerClientTests-acknowledgements.plist"; sourceTree = "<group>"; };
04B96D6AE9F0F69FC801059349B8A234 /* wrap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = wrap.swift; path = Sources/wrap.swift; sourceTree = "<group>"; };
05D32F7DA10CFDD71EAA3EA19946CD1D /* when.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = when.swift; path = Sources/when.swift; sourceTree = "<group>"; };
08A7F97EB8AC32E44E21839FA607D2CE /* Validation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Validation.swift; path = Source/Validation.swift; sourceTree = "<group>"; };
0B4A4A4EB2DBD6F56B1383E53763FD1B /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PetstoreClient.framework; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0B4A4A4EB2DBD6F56B1383E53763FD1B /* PetstoreClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PetstoreClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
0B75FBDF2B74DA3B74C5F0ADD20F42A2 /* DispatchQueue+Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DispatchQueue+Promise.swift"; path = "Sources/DispatchQueue+Promise.swift"; sourceTree = "<group>"; };
0BA93068A5B18A779CC9B0FC3F685400 /* OuterNumber.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterNumber.swift; sourceTree = "<group>"; };
13C6EEF1D81A0C523AE569F1732AC8DC /* OuterEnum.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterEnum.swift; sourceTree = "<group>"; };
158D0513D0844E7FE6AEFAEE70E88618 /* UserAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = UserAPI.swift; sourceTree = "<group>"; };
17FF216D0378037475BAB48A20D5CB0F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1B900B675208453FB7767B0D97D50932 /* ArrayOfArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfArrayOfNumberOnly.swift; sourceTree = "<group>"; };
1F11D15E4489C7F4DC1171EB9F5448D0 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Alamofire.modulemap; sourceTree = "<group>"; };
1F11D15E4489C7F4DC1171EB9F5448D0 /* Alamofire.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Alamofire.modulemap; sourceTree = "<group>"; };
21A143975CF52EBFEF79A307CC7CB00E /* OuterBoolean.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = OuterBoolean.swift; sourceTree = "<group>"; };
22932972F4F492160D4694C01CAF311D /* Promise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = "<group>"; };
2293B3E9936106C01A2A831A2C1E8AD6 /* race.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = race.swift; path = Sources/race.swift; sourceTree = "<group>"; };
@@ -179,8 +179,7 @@
28F73294B64CD8821EC2467CB7F1F073 /* Dog.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Dog.swift; sourceTree = "<group>"; };
291054DAA3207AFC1F6B3D7AD6C25E5C /* Pods-SwaggerClient-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClient-dummy.m"; sourceTree = "<group>"; };
2A332587F10679E262455F979B3D1055 /* NumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = NumberOnly.swift; sourceTree = "<group>"; };
2ACC287E45C0FCE8717A34B8ECA88A30 /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PetstoreClient.modulemap; sourceTree = "<group>"; };
2AE3690E05FA4B6B3A8600FCA1631D8C /* Fake_classname_tags123API.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Fake_classname_tags123API.swift; sourceTree = "<group>"; };
2ACC287E45C0FCE8717A34B8ECA88A30 /* PetstoreClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PetstoreClient.modulemap; sourceTree = "<group>"; };
2C0EF68B5117187E979D1DE4ECDB938E /* Name.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Name.swift; sourceTree = "<group>"; };
2FF17440CCD2E1A69791A4AA23325AD5 /* Pods-SwaggerClient-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwaggerClient-acknowledgements.markdown"; sourceTree = "<group>"; };
30B827D77F92D24E6D24561F491F2A50 /* ArrayTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayTest.swift; sourceTree = "<group>"; };
@@ -203,7 +202,7 @@
4530F24A4BDA094563779F1D4313B9E1 /* Cat.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Cat.swift; sourceTree = "<group>"; };
45CB52E75AED2F044F187FD71FDFC880 /* ArrayOfNumberOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ArrayOfNumberOnly.swift; sourceTree = "<group>"; };
466D426E7AA31C27ABC601DD606EF126 /* JSONEncodableEncoding.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodableEncoding.swift; path = PetstoreClient/Classes/Swaggers/JSONEncodableEncoding.swift; sourceTree = "<group>"; };
46A00B403166BEF9EE215F6CB59BE9A6 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClient.framework; path = "Pods-SwaggerClient.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
46A00B403166BEF9EE215F6CB59BE9A6 /* Pods_SwaggerClient.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClient.framework; sourceTree = BUILT_PRODUCTS_DIR; };
475EFFB863F38801DE73965C1438E2FF /* PetAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = PetAPI.swift; sourceTree = "<group>"; };
47F1D5162720B2001CA614017A1ACE90 /* join.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = join.m; path = Sources/join.m; sourceTree = "<group>"; };
48CCB9793CCE13A24831B3E01B29171A /* PromiseKit-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PromiseKit-prefix.pch"; sourceTree = "<group>"; };
@@ -224,7 +223,7 @@
687B19CB3E722272B41D60B485C29EE7 /* Pods-SwaggerClientTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwaggerClientTests-dummy.m"; sourceTree = "<group>"; };
6B9A5CB4B436C4A88BA49990C94DB065 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
6C68BF2CC332C9D6485B777BA7C063AE /* Alamofire.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Alamofire.xcconfig; sourceTree = "<group>"; };
6D7294312CFFF12B79A7AD2E8D219344 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = PromiseKit.modulemap; sourceTree = "<group>"; };
6D7294312CFFF12B79A7AD2E8D219344 /* PromiseKit.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PromiseKit.modulemap; sourceTree = "<group>"; };
714D784CFA6CB99C3B07B03487960BE0 /* Response.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Response.swift; path = Source/Response.swift; sourceTree = "<group>"; };
7417953898146193F86A165CD5F3AF4A /* Category.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Category.swift; sourceTree = "<group>"; };
7824BE1937712800889974B222CAB1AD /* GlobalState.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GlobalState.m; path = Sources/GlobalState.m; sourceTree = "<group>"; };
@@ -235,15 +234,14 @@
80933905730AC186F9CA86852B3817E6 /* AnyPromise.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = AnyPromise.h; path = Sources/AnyPromise.h; sourceTree = "<group>"; };
849FECBC6CC67F2B6800F982927E3A9E /* Pods-SwaggerClientTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClientTests.release.xcconfig"; sourceTree = "<group>"; };
854F6A83AC5201A267F39995BF249D32 /* AlamofireImplementations.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AlamofireImplementations.swift; path = PetstoreClient/Classes/Swaggers/AlamofireImplementations.swift; sourceTree = "<group>"; };
85A2666A7F91E968D48E2EEC1623BB02 /* FakeclassnametagsAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = FakeclassnametagsAPI.swift; sourceTree = "<group>"; };
8689097AED0350F905AFA5B0962FA969 /* Animal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Animal.swift; sourceTree = "<group>"; };
86B1DDCB9E27DF43C2C35D9E7B2E84DA /* Pods-SwaggerClient.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwaggerClient.release.xcconfig"; sourceTree = "<group>"; };
87DCB85380B2EC22CFE743BEDE7E4114 /* Return.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Return.swift; sourceTree = "<group>"; };
88EC57640E276EA2387256530FB1F868 /* EnumArrays.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = EnumArrays.swift; sourceTree = "<group>"; };
897799EBBCCE802354256F9E7984C2CF /* StoreAPI.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = StoreAPI.swift; sourceTree = "<group>"; };
8B87E0BA794A79025212F37D32449C63 /* List.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = List.swift; sourceTree = "<group>"; };
8BBF3490280C4ED53738743F84C890BC /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_SwaggerClientTests.framework; path = "Pods-SwaggerClientTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; };
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
8BBF3490280C4ED53738743F84C890BC /* Pods_SwaggerClientTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_SwaggerClientTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
947066689D96D035F88E7408FA47E193 /* Promise+AnyPromise.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Promise+AnyPromise.swift"; path = "Sources/Promise+AnyPromise.swift"; sourceTree = "<group>"; };
948BFEDB052F09AD8DAE3BD3CB286673 /* ResponseSerialization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ResponseSerialization.swift; path = Source/ResponseSerialization.swift; sourceTree = "<group>"; };
9585493102C1567226760B6BACFDF648 /* SessionManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SessionManager.swift; path = Source/SessionManager.swift; sourceTree = "<group>"; };
@@ -254,7 +252,7 @@
A03102A2289886143D394C1EEF173C69 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A9930F8E68307FDF3470DAFB398895B2 /* APIHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = APIHelper.swift; path = PetstoreClient/Classes/Swaggers/APIHelper.swift; sourceTree = "<group>"; };
ACDBB9A0818694ED3F5545A2102E7624 /* dispatch_promise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = dispatch_promise.m; path = Sources/dispatch_promise.m; sourceTree = "<group>"; };
AD3B511F5C43568AAFBA2714468F9FD5 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = PromiseKit.framework; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AD3B511F5C43568AAFBA2714468F9FD5 /* PromiseKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PromiseKit.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AE6E736FF5D4320FE1647DB1724C14B8 /* Timeline.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Timeline.swift; path = Source/Timeline.swift; sourceTree = "<group>"; };
B5DF7C9C577375BE47CAE380DE3EBE19 /* HasOnlyReadOnly.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = HasOnlyReadOnly.swift; sourceTree = "<group>"; };
B6AFE5B442894FF7BEA9ECAB0A39B4AD /* after.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = after.swift; path = Sources/after.swift; sourceTree = "<group>"; };
@@ -274,10 +272,12 @@
CA6251246DA0044C165AC891CDE64344 /* hang.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = hang.m; path = Sources/hang.m; sourceTree = "<group>"; };
CB66B121BF9B4DF48FE2F6A4D044C443 /* AnyPromise.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = AnyPromise.m; path = Sources/AnyPromise.m; sourceTree = "<group>"; };
D2841E5E2183846280B97F6E660DA26C /* Pods-SwaggerClient-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClient-resources.sh"; sourceTree = "<group>"; };
D54B91C81FC091E900319969 /* FakeClassnameTags123API.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FakeClassnameTags123API.swift; sourceTree = "<group>"; };
D54B91C91FC091E900319969 /* AnotherfakeAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AnotherfakeAPI.swift; sourceTree = "<group>"; };
D75CBCB14282D5EBA5A424CCF0655C2A /* MultipartFormData.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MultipartFormData.swift; path = Source/MultipartFormData.swift; sourceTree = "<group>"; };
DA33807992507937BA2869E4D72BA073 /* Zalgo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Zalgo.swift; path = Sources/Zalgo.swift; sourceTree = "<group>"; };
DB3DDF6C3277994828CD09F3155BB74E /* JSONEncodingHelper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = JSONEncodingHelper.swift; path = PetstoreClient/Classes/Swaggers/JSONEncodingHelper.swift; sourceTree = "<group>"; };
DE164497A94DD3215ED4D1AE0D4703B1 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-SwaggerClient.modulemap"; sourceTree = "<group>"; };
DE164497A94DD3215ED4D1AE0D4703B1 /* Pods-SwaggerClient.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-SwaggerClient.modulemap"; sourceTree = "<group>"; };
DE689938DB1BB3BAF7C98928CB02978A /* Result.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Result.swift; path = Source/Result.swift; sourceTree = "<group>"; };
DF26681AB7FB981F237CD8EA4F059708 /* MapTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MapTest.swift; sourceTree = "<group>"; };
E0A482A15F21B4BC206B31E7A0FAB79F /* Capitalization.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Capitalization.swift; sourceTree = "<group>"; };
@@ -286,7 +286,7 @@
E4E6F4A58FE7868CA2177D3AC79AD2FA /* Pods-SwaggerClientTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-SwaggerClientTests-resources.sh"; sourceTree = "<group>"; };
E775A7621846699F1A762DB966B3DC48 /* State.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = State.swift; path = Sources/State.swift; sourceTree = "<group>"; };
E7B845A9435BD8A5A34664D1A66B8484 /* PromiseKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PromiseKit-dummy.m"; sourceTree = "<group>"; };
E80A16C989615AAE419866DB4FD10185 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Alamofire.framework; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; };
E80A16C989615AAE419866DB4FD10185 /* Alamofire.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Alamofire.framework; sourceTree = BUILT_PRODUCTS_DIR; };
EB834CA4A0478028D959D9EBD119D953 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
EEA7D6AB49001069ED310CBCA8FCBB44 /* AFError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AFError.swift; path = Source/AFError.swift; sourceTree = "<group>"; };
F05D3E8C18F8C0EF732558438FAA421A /* Extensions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = PetstoreClient/Classes/Swaggers/Extensions.swift; sourceTree = "<group>"; };
@@ -348,7 +348,6 @@
15CB611E37F9E1F821FFD8B29C385FF9 /* CorePromise */,
A5A38542CF9E498066C1C41B2E15BBFF /* Support Files */,
);
name = PromiseKit;
path = PromiseKit;
sourceTree = "<group>";
};
@@ -404,7 +403,6 @@
08A7F97EB8AC32E44E21839FA607D2CE /* Validation.swift */,
8949F214ACEA39133A2AAB6508F73CC0 /* Support Files */,
);
name = Alamofire;
path = Alamofire;
sourceTree = "<group>";
};
@@ -435,9 +433,9 @@
7C3C4943F0B3A9E87CCF23AA96272CB5 /* APIs */ = {
isa = PBXGroup;
children = (
2AE3690E05FA4B6B3A8600FCA1631D8C /* Fake_classname_tags123API.swift */,
D54B91C91FC091E900319969 /* AnotherfakeAPI.swift */,
7C6145F09A87143B7FC501BE989C8BBD /* FakeAPI.swift */,
85A2666A7F91E968D48E2EEC1623BB02 /* FakeclassnametagsAPI.swift */,
D54B91C81FC091E900319969 /* FakeClassnameTags123API.swift */,
475EFFB863F38801DE73965C1438E2FF /* PetAPI.swift */,
897799EBBCCE802354256F9E7984C2CF /* StoreAPI.swift */,
158D0513D0844E7FE6AEFAEE70E88618 /* UserAPI.swift */,
@@ -836,6 +834,7 @@
1F4886332EE9958B4953893705FF9246 /* Animal.swift in Sources */,
E9783E1D3A6A0CD9CF2ACCA74A89CC8F /* AnimalFarm.swift in Sources */,
E80880F475CC14AFB6795F1451DDE2B4 /* APIHelper.swift in Sources */,
D54B91CB1FC091E900319969 /* AnotherfakeAPI.swift in Sources */,
38C508C4B73F4EEF12972C4DEBBB59BD /* ApiResponse.swift in Sources */,
7F7153A9E140DB803EFB19D4C3D2408A /* APIs.swift in Sources */,
4E875FE97DC4CFCD45EF180B1930BA87 /* ArrayOfArrayOfNumberOnly.swift in Sources */,
@@ -853,9 +852,7 @@
0E4F6AB01CA15D7ACE27641BA3803ACE /* EnumClass.swift in Sources */,
34104D7277F8474FCBB80637A8364337 /* EnumTest.swift in Sources */,
884B23FB0C4EA228B4694F191D531090 /* Extensions.swift in Sources */,
DBC481AC7EB3A4F2E547F52BAF547922 /* Fake_classname_tags123API.swift in Sources */,
2AA4FCEA014BFBBBD56C909C02B98A77 /* FakeAPI.swift in Sources */,
D5275BCBC0725D755D5945A9AB6C5A40 /* FakeclassnametagsAPI.swift in Sources */,
D9FEE02D3C00097A882DCF9AF60C4FDC /* FormatTest.swift in Sources */,
5742106D27D324737B72F32CBAC98924 /* HasOnlyReadOnly.swift in Sources */,
B6FE8649C8F2D879752D6CC0BAA7D8D3 /* JSONEncodableEncoding.swift in Sources */,
@@ -875,6 +872,7 @@
32495BBAAED67B464B26E37EFC43BFAA /* OuterString.swift in Sources */,
AF0CAB7D38117E91D76835CE62FE9530 /* Pet.swift in Sources */,
C57A01A8A02024DD3C4F013AB8F41F71 /* PetAPI.swift in Sources */,
D54B91CA1FC091E900319969 /* FakeClassnameTags123API.swift in Sources */,
E86EED1FA38087909568DED335E7B9A5 /* PetstoreClient-dummy.m in Sources */,
EF15BEAF1A002B97A226F9AF3D3C0F26 /* ReadOnlyFirst.swift in Sources */,
7DBDDA5406CB59867FC877F1032BC905 /* Return.swift in Sources */,

View File

@@ -36,7 +36,7 @@ git_remote=`git remote`
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git