Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ import Vapor{{/useVapor}}
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ internal struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public struct APIHelper {
guard let value = value else { return nil }
if let value = value as? any RawRepresentable {
return "\(value.rawValue)"
} else if let data = value as? Data {
return data.base64EncodedString(options: Data.Base64EncodingOptions())
} else {
return "\(value)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ extension Dictionary where Key: Sendable, Value: Sendable {
}

extension Data: ParameterConvertible {
func asParameter(codableHelper: CodableHelper) -> any Sendable {
return self.base64EncodedString(options: Data.Base64EncodingOptions())
}
func asParameter(codableHelper: CodableHelper) -> any Sendable { self }
}

extension Date: ParameterConvertible {
Expand Down
Loading