Skip to content

Commit

Permalink
setting up swift 6
Browse files Browse the repository at this point in the history
  • Loading branch information
leogdion committed Nov 5, 2024
1 parent 6d7e4a6 commit 9bb3e21
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Sources/IPSWDownloads/Firmware.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

import Foundation
public import Foundation
import OperatingSystemVersion

/// A struct representing firmware details of a device.
Expand Down
19 changes: 16 additions & 3 deletions Sources/IPSWDownloads/Generated/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ extension APIProtocol {

/// Server URLs defined in the OpenAPI document.
internal enum Servers {
internal enum Server1 {
internal static func url() throws -> Foundation.URL {
try Foundation.URL(
validatingOpenAPIServerURL: "https://api.ipsw.me/v4",
variables: []
)
}
}
@available(*, deprecated, renamed: "Servers.Server1.url")
internal static func server1() throws -> Foundation.URL {
try Foundation.URL(
validatingOpenAPIServerURL: "https://api.ipsw.me/v4",
Expand Down Expand Up @@ -250,6 +259,8 @@ internal enum Operations {
internal struct Input: Sendable, Hashable {
/// - Remark: Generated from `#/paths/device/{identifier}/GET/path`.
internal struct Path: Sendable, Hashable {
///
///
/// - Remark: Generated from `#/paths/device/{identifier}/GET/path/identifier`.
internal var identifier: Swift.String
/// Creates a new `Path`.
Expand All @@ -263,6 +274,8 @@ internal enum Operations {
internal var path: Operations.getDevice.Input.Path
/// - Remark: Generated from `#/paths/device/{identifier}/GET/query`.
internal struct Query: Sendable, Hashable {
///
///
/// - Remark: Generated from `#/paths/device/{identifier}/GET/query/type`.
internal var _type: Swift.String
/// Creates a new `Query`.
Expand Down Expand Up @@ -302,7 +315,7 @@ internal enum Operations {
self.headers = headers
}
}
@frozen internal enum Output: Sendable, Hashable {
internal enum Output: Sendable, Hashable {
internal struct Ok: Sendable, Hashable {
/// - Remark: Generated from `#/paths/device/{identifier}/GET/responses/200/headers`.
internal struct Headers: Sendable, Hashable {
Expand Down Expand Up @@ -341,7 +354,7 @@ internal enum Operations {
/// Received HTTP response headers
internal var headers: Operations.getDevice.Output.Ok.Headers
/// - Remark: Generated from `#/paths/device/{identifier}/GET/responses/200/content`.
@frozen internal enum Body: Sendable, Hashable {
internal enum Body: Sendable, Hashable {
/// - Remark: Generated from `#/paths/device/{identifier}/GET/responses/200/content/application\/json`.
case json(Components.Schemas.Device)
/// The associated value of the enum case if `self` is `.json`.
Expand Down Expand Up @@ -501,7 +514,7 @@ internal enum Operations {
/// A response with a code that is not documented in the OpenAPI document.
case undocumented(statusCode: Swift.Int, OpenAPIRuntime.UndocumentedPayload)
}
@frozen internal enum AcceptableContentType: AcceptableProtocol {
internal enum AcceptableContentType: AcceptableProtocol {
case json
case application_x_hyphen_plist
case xml
Expand Down
6 changes: 3 additions & 3 deletions Sources/IPSWDownloads/IPSWDownloads.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

import Foundation
import OpenAPIRuntime
public import Foundation
public import OpenAPIRuntime

/// Client for downloading current and previous versions
/// of Apple's iOS Firmware, iTunes and OTA updates.
public struct IPSWDownloads: Sendable {
// swiftlint:disable:next force_try
private static let serverURL = try! Servers.server1()
private static let serverURL = try! Servers.Server1.url()

/// The underlying generated client to make HTTP requests to IPSWDownloads.
private let underlyingClient: any APIProtocol
Expand Down
2 changes: 1 addition & 1 deletion Sources/IPSWDownloads/URL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
// OTHER DEALINGS IN THE SOFTWARE.
//

import Foundation
public import Foundation

extension URL {
/// Returns a validated server URL, or throws an error.
Expand Down

0 comments on commit 9bb3e21

Please sign in to comment.