mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 14:40:53 +00:00
shell script ran under /bin/swift3-petstore.sh
This commit is contained in:
parent
a3871d1f33
commit
fa555cf452
@ -125,12 +125,12 @@ class Decoders {
|
||||
|
||||
static func decode<T>(clazz: T.Type, source: AnyObject, instance: AnyObject?) -> Decoded<T> {
|
||||
initialize()
|
||||
if let value = source.int32Value as? T, source is NSNumber, T.self is Int32.Type {
|
||||
return .success(value)
|
||||
}
|
||||
if let value = source.int32Value as? T, source is NSNumber, T.self is Int64.Type {
|
||||
return .success(value)
|
||||
}
|
||||
if let sourceNumber = source as? NSNumber, let value = sourceNumber.int32Value as? T, T.self is Int32.Type {
|
||||
return .success(value)
|
||||
}
|
||||
if let sourceNumber = source as? NSNumber, let value = sourceNumber.int32Value as? T, T.self is Int64.Type {
|
||||
return .success(value)
|
||||
}
|
||||
if let intermediate = source as? String, let value = UUID(uuidString: intermediate) as? T, source is String, T.self is UUID.Type {
|
||||
return .success(value)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user