Skip to content

Commit

Permalink
Merge pull request AvdLee#230 from marcelmendesfilho/codableResponse
Browse files Browse the repository at this point in the history
Conforming Response to Codable
  • Loading branch information
AvdLee authored May 1, 2023
2 parents 1a4bcf2 + 2f422bf commit df11b1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/RateLimit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import Foundation

public struct RateLimit {
public struct RateLimit: Codable {
/// Rate limit entries
public let entries: [String: Int]

Expand Down
2 changes: 1 addition & 1 deletion Sources/RequestExecutor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import FoundationNetworking
#endif

/// The result type delivered from a successful URLRequest
public struct Response<T> {
public struct Response<T:Codable>: Codable{
public typealias StatusCode = Int

public let requestURL: URL?
Expand Down
2 changes: 1 addition & 1 deletion Tests/APIProviderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import XCTest

final class APIProviderTests: XCTestCase {

private struct MockRequestExecutor<T>: RequestExecutor {
private struct MockRequestExecutor<T:Codable>: RequestExecutor {

let expectedResponse: Result<Response<T>, Swift.Error>

Expand Down

0 comments on commit df11b1c

Please sign in to comment.