Skip to content
Open
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 @@ -1643,7 +1643,7 @@
public let credential: PaymentCredential?
/// Display information for this payment instrument. Each payment instrument schema defines
/// its specific display properties, as outlined by the payment handler.
public let display: [String: JSONAny]?

Check warning on line 1646 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'display' of 'Sendable'-conforming struct 'SelectedPaymentInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 1646 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'display' of 'Sendable'-conforming struct 'SelectedPaymentInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 1646 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'display' of 'Sendable'-conforming struct 'SelectedPaymentInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 1646 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'display' of 'Sendable'-conforming struct 'SelectedPaymentInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// The unique identifier for the handler instance that produced this instrument. This
/// corresponds to the 'id' field in the Payment Handler definition.
public let handlerID: String
Expand Down Expand Up @@ -2048,7 +2048,7 @@
// MARK: - CapabilityResponseSchema
public struct CapabilityResponseSchema: Codable, Sendable {
/// Entity-specific configuration. Structure defined by each entity's schema.
public let config: [String: JSONAny]?

Check warning on line 2051 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'config' of 'Sendable'-conforming struct 'CapabilityResponseSchema' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 2051 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'config' of 'Sendable'-conforming struct 'CapabilityResponseSchema' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// Unique identifier for this entity instance. Used to disambiguate when multiple instances
/// exist.
public let id: String?
Expand Down Expand Up @@ -2154,7 +2154,7 @@
// MARK: - PaymentHandlerResponseSchema
public struct PaymentHandlerResponseSchema: Codable, Sendable {
/// Entity-specific configuration. Structure defined by each entity's schema.
public let config: [String: JSONAny]?

Check warning on line 2157 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'config' of 'Sendable'-conforming struct 'PaymentHandlerResponseSchema' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 2157 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'config' of 'Sendable'-conforming struct 'PaymentHandlerResponseSchema' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// Unique identifier for this entity instance. Used to disambiguate when multiple instances
/// exist.
public let id: String
Expand Down Expand Up @@ -2233,7 +2233,7 @@
public struct PaymentHandlerResponseSchemaAvailableInstrument: Codable, Sendable {
/// Constraints on this instrument type. Structure depends on instrument type and active
/// capabilities.
public let constraints: [String: JSONAny]?

Check warning on line 2236 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'constraints' of 'Sendable'-conforming struct 'PaymentHandlerResponseSchemaAvailableInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 2236 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'constraints' of 'Sendable'-conforming struct 'PaymentHandlerResponseSchemaAvailableInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// The instrument type identifier (e.g., 'card', 'gift_card'). References an instrument
/// schema's type constant.
public let type: String
Expand Down Expand Up @@ -3252,7 +3252,7 @@
// MARK: - UCPOrderResponseSchemaService
public struct UCPOrderResponseSchemaService: Codable, Sendable {
/// Entity-specific configuration. Structure defined by each entity's schema.
public let config: [String: JSONAny]?

Check warning on line 3255 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'config' of 'Sendable'-conforming struct 'UCPOrderResponseSchemaService' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 3255 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'config' of 'Sendable'-conforming struct 'UCPOrderResponseSchemaService' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// Unique identifier for this entity instance. Used to disambiguate when multiple instances
/// exist.
public let id: String?
Expand Down Expand Up @@ -3729,7 +3729,7 @@
// MARK: - CapabilityElement
public struct CapabilityElement: Codable, Sendable {
/// Entity-specific configuration. Structure defined by each entity's schema.
public let config: [String: JSONAny]?

Check warning on line 3732 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'config' of 'Sendable'-conforming struct 'CapabilityElement' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 3732 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'config' of 'Sendable'-conforming struct 'CapabilityElement' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// Unique identifier for this entity instance. Used to disambiguate when multiple instances
/// exist.
public let id: String?
Expand Down Expand Up @@ -3805,7 +3805,7 @@
// MARK: - PaymentHandlerElement
public struct PaymentHandlerElement: Codable, Sendable {
/// Entity-specific configuration. Structure defined by each entity's schema.
public let config: [String: JSONAny]?

Check warning on line 3808 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'config' of 'Sendable'-conforming struct 'PaymentHandlerElement' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 3808 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'config' of 'Sendable'-conforming struct 'PaymentHandlerElement' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// Unique identifier for this entity instance. Used to disambiguate when multiple instances
/// exist.
public let id: String
Expand Down Expand Up @@ -3884,7 +3884,7 @@
public struct PaymentHandlerAvailableInstrument: Codable, Sendable {
/// Constraints on this instrument type. Structure depends on instrument type and active
/// capabilities.
public let constraints: [String: JSONAny]?

Check warning on line 3887 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'constraints' of 'Sendable'-conforming struct 'PaymentHandlerAvailableInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 3887 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'constraints' of 'Sendable'-conforming struct 'PaymentHandlerAvailableInstrument' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// The instrument type identifier (e.g., 'card', 'gift_card'). References an instrument
/// schema's type constant.
public let type: String
Expand Down Expand Up @@ -3936,7 +3936,7 @@
// MARK: - InstrumentsChangeService
public struct InstrumentsChangeService: Codable, Sendable {
/// Entity-specific configuration. Structure defined by each entity's schema.
public let config: [String: JSONAny]?

Check warning on line 3939 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Breaking Changes / Swift

stored property 'config' of 'Sendable'-conforming struct 'InstrumentsChangeService' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode

Check warning on line 3939 in protocol/languages/swift/Sources/ShopifyCheckoutProtocol/Generated/Models.swift

View workflow job for this annotation

GitHub Actions / Swift / package-tests / Run Package Tests

stored property 'config' of 'Sendable'-conforming struct 'InstrumentsChangeService' contains non-Sendable type 'JSONAny'; this is an error in the Swift 6 language mode
/// Unique identifier for this entity instance. Used to disambiguate when multiple instances
/// exist.
public let id: String?
Expand Down Expand Up @@ -4173,7 +4173,7 @@
}
}

class JSONCodingKey: CodingKey {
final class JSONCodingKey: CodingKey, Sendable {
let key: String

required init?(intValue: Int) {
Expand Down
16 changes: 15 additions & 1 deletion protocol/scripts/generate_models.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,21 @@ async function generateSwift(specDir, output) {
output,
]);

await normalizeGeneratedFile(output);
await normalizeGeneratedFile(output, (source) => {
// quicktype's --sendable option marks generated models as Sendable, but quicktype 23.2.6
// still emits the dynamic JSON coding key helper as a non-final, non-Sendable class.
// Removing --swift-5-support does not change this output, so normalize the helper here.
const result = source.replace(
/^class JSONCodingKey: CodingKey \{/m,
"final class JSONCodingKey: CodingKey, Sendable {",
);

if (result === source) {
throw new Error("JSONCodingKey Sendable normalization failed; quicktype output may have changed");
}

return result;
});
}

async function generateTypescript(specDir, output) {
Expand Down
Loading