diff --git a/platforms/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift b/platforms/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift index d595a271..4c034dea 100644 --- a/platforms/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift +++ b/platforms/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift @@ -7623,17 +7623,13 @@ func newJSONEncoder() -> JSONEncoder { // MARK: - Encode/decode helpers -public class JSONNull: Codable, Hashable { +public final class JSONNull: Codable, Hashable, Sendable { public static func == (_: JSONNull, _: JSONNull) -> Bool { return true } - public var hashValue: Int { - return 0 - } - - public func hash(into _: inout Hasher) { - // No-op + public func hash(into hasher: inout Hasher) { + hasher.combine(0) } public init() {} @@ -7671,7 +7667,7 @@ final class JSONCodingKey: CodingKey, Sendable { } } -public class JSONAny: Codable { +public final class JSONAny: Codable, @unchecked Sendable { public let value: Any static func decodingError(forCodingPath codingPath: [CodingKey]) -> DecodingError { diff --git a/protocol/scripts/generate_models.sh b/protocol/scripts/generate_models.sh index c8c1123e..79595d65 100755 --- a/protocol/scripts/generate_models.sh +++ b/protocol/scripts/generate_models.sh @@ -213,7 +213,6 @@ case "$LANG" in OUTPUT="${REPO_ROOT}/platforms/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift" quicktype \ --lang swift \ - --swift-5-support \ --access-level public \ --sendable \ --src-lang schema \ @@ -233,7 +232,11 @@ case "$LANG" in sed -i '' -E \ -e 's/[[:<:]]Binding[[:>:]]/TokenBinding/g' \ -e 's/[[:<:]]ColorScheme[[:>:]]/EmbeddedColorScheme/g' \ + -e 's/^public class JSONNull: Codable, Hashable {/public final class JSONNull: Codable, Hashable, Sendable {/' \ + -e 's/^ public func hash\(into _: inout Hasher\) {/ public func hash(into hasher: inout Hasher) {/' \ + -e 's/^ \/\/ No-op$/ hasher.combine(0)/' \ -e 's/^class JSONCodingKey: CodingKey {/final class JSONCodingKey: CodingKey, Sendable {/' \ + -e 's/^public class JSONAny: Codable {/public final class JSONAny: Codable, @unchecked Sendable {/' \ "${OUTPUT}" prepend_license "swift" "${OUTPUT}"