forked from loafle/openapi-generator-original
[swift5] Fix missing case for FormDataEncoding#encode (#11064)
Fixes #11062
This commit is contained in:
parent
550c0781dc
commit
c94d2b2331
@ -114,6 +114,8 @@ private var managerStore = SynchronizedDictionary<String, Alamofire.Session>()
|
|||||||
mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
|
mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
|
||||||
case let number as NSNumber:
|
case let number as NSNumber:
|
||||||
mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
|
mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
|
||||||
|
case let data as Data:
|
||||||
|
mpForm.append(data, withName: k)
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(v) with key \(k)")
|
fatalError("Unprocessable value \(v) with key \(k)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -114,6 +114,8 @@ open class AlamofireRequestBuilder<T>: RequestBuilder<T> {
|
|||||||
mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
|
mpForm.append(string.data(using: String.Encoding.utf8)!, withName: k)
|
||||||
case let number as NSNumber:
|
case let number as NSNumber:
|
||||||
mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
|
mpForm.append(number.stringValue.data(using: String.Encoding.utf8)!, withName: k)
|
||||||
|
case let data as Data:
|
||||||
|
mpForm.append(data, withName: k)
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(v) with key \(k)")
|
fatalError("Unprocessable value \(v) with key \(k)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
@ -477,6 +477,15 @@ private class FormDataEncoding: ParameterEncoding {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case let data as Data:
|
||||||
|
|
||||||
|
urlRequest = configureDataUploadRequest(
|
||||||
|
urlRequest: urlRequest,
|
||||||
|
boundary: boundary,
|
||||||
|
name: key,
|
||||||
|
data: data
|
||||||
|
)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fatalError("Unprocessable value \(value) with key \(key)")
|
fatalError("Unprocessable value \(value) with key \(key)")
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user