diff --git a/Source/SwiftyDropbox/Shared/Generated/Base.swift b/Source/SwiftyDropbox/Shared/Generated/Base.swift index 234f1bd1..4fe26b57 100644 --- a/Source/SwiftyDropbox/Shared/Generated/Base.swift +++ b/Source/SwiftyDropbox/Shared/Generated/Base.swift @@ -6,7 +6,7 @@ import Foundation -public class DropboxBase { +public class DropboxBase: DropboxTransportClientOwning { public var client: DropboxTransportClient /// Routes within the account namespace. See AccountRoutes for details. @@ -34,7 +34,7 @@ public class DropboxBase { /// Routes within the users namespace. See UsersRoutes for details. public var users: UsersRoutes! - public init(client: DropboxTransportClient) { + public required init(client: DropboxTransportClient) { self.client = client self.account = AccountRoutes(client: client) diff --git a/Source/SwiftyDropbox/Shared/Generated/BaseApp.swift b/Source/SwiftyDropbox/Shared/Generated/BaseApp.swift index 340d2b29..4cdd60b7 100644 --- a/Source/SwiftyDropbox/Shared/Generated/BaseApp.swift +++ b/Source/SwiftyDropbox/Shared/Generated/BaseApp.swift @@ -6,7 +6,7 @@ import Foundation -public class DropboxAppBase { +public class DropboxAppBase: DropboxTransportClientOwning { public var client: DropboxTransportClient /// Routes within the auth namespace. See AuthAppAuthRoutes for details. @@ -14,7 +14,7 @@ public class DropboxAppBase { /// Routes within the check namespace. See CheckAppAuthRoutes for details. public var check: CheckAppAuthRoutes! - public init(client: DropboxTransportClient) { + public required init(client: DropboxTransportClient) { self.client = client self.auth = AuthAppAuthRoutes(client: client) diff --git a/Source/SwiftyDropbox/Shared/Generated/BaseTeam.swift b/Source/SwiftyDropbox/Shared/Generated/BaseTeam.swift index 7efdcab1..2d0ffc40 100644 --- a/Source/SwiftyDropbox/Shared/Generated/BaseTeam.swift +++ b/Source/SwiftyDropbox/Shared/Generated/BaseTeam.swift @@ -6,13 +6,13 @@ import Foundation -public class DropboxTeamBase { +public class DropboxTeamBase: DropboxTransportClientOwning { public var client: DropboxTransportClient /// Routes within the team namespace. See TeamRoutes for details. public var team: TeamRoutes! - public init(client: DropboxTransportClient) { + public required init(client: DropboxTransportClient) { self.client = client self.team = TeamRoutes(client: client) diff --git a/Source/SwiftyDropbox/Shared/Handwritten/DropboxAppClient.swift b/Source/SwiftyDropbox/Shared/Handwritten/DropboxAppClient.swift index e8951062..7d5bc7d6 100644 --- a/Source/SwiftyDropbox/Shared/Handwritten/DropboxAppClient.swift +++ b/Source/SwiftyDropbox/Shared/Handwritten/DropboxAppClient.swift @@ -16,4 +16,12 @@ public class DropboxAppClient: DropboxAppBase { self.transportClient = transportClient super.init(client: transportClient) } + + /// Initializer used by DropboxTransportClientOwning in tests. + /// + /// - Parameter client: The underlying DropboxTransportClient to make API calls. + required convenience init(client: DropboxTransportClient) { + self.init(transportClient: client) + } + } diff --git a/Source/SwiftyDropbox/Shared/Handwritten/DropboxClient.swift b/Source/SwiftyDropbox/Shared/Handwritten/DropboxClient.swift index 3d82f757..a808cee2 100644 --- a/Source/SwiftyDropbox/Shared/Handwritten/DropboxClient.swift +++ b/Source/SwiftyDropbox/Shared/Handwritten/DropboxClient.swift @@ -85,6 +85,13 @@ public class DropboxClient: DropboxBase { super.init(client: transportClient) } + /// Initializer used by DropboxTransportClientOwning in tests. + /// + /// - Parameter client: The underlying DropboxTransportClient to make API calls. + required convenience init(client: DropboxTransportClient) { + self.init(transportClient: client) + } + /// Creates a new DropboxClient instance with the given path root. /// /// - Parameter pathRoot: User's path root. diff --git a/Source/SwiftyDropbox/Shared/Handwritten/DropboxTeamClient.swift b/Source/SwiftyDropbox/Shared/Handwritten/DropboxTeamClient.swift index 46755d00..09f34d92 100644 --- a/Source/SwiftyDropbox/Shared/Handwritten/DropboxTeamClient.swift +++ b/Source/SwiftyDropbox/Shared/Handwritten/DropboxTeamClient.swift @@ -60,6 +60,13 @@ public class DropboxTeamClient: DropboxTeamBase { super.init(client: transportClient) } + /// Initializer used by DropboxTransportClientOwning in tests. + /// + /// - Parameter client: The underlying DropboxTransportClient to make API calls. + required convenience init(client: DropboxTransportClient) { + self.init(transportClient: client) + } + /// Creates a new DropboxClient instance for the team member id. /// /// - Parameter memberId: Team member id. diff --git a/stone b/stone index f02b6de6..eb375a6d 160000 --- a/stone +++ b/stone @@ -1 +1 @@ -Subproject commit f02b6de60ee36780f8c37216ab765fea21ffbf40 +Subproject commit eb375a6d0f3418c3fb0dbfd386b57afd1f213c47