Skip to content

Commit

Permalink
fix: Remove remaining explicit snake case coding keys (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann authored Dec 5, 2024
2 parents 1a9e9a9 + 11ec243 commit e0eca07
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
5 changes: 0 additions & 5 deletions Sources/InfomaniakCore/Account/Account.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ open class Account: Codable {
token = apiToken
userId = apiToken.userId
}

enum CodingKeys: CodingKey {
case userId
case user
}
}

extension Account: Equatable {
Expand Down
5 changes: 0 additions & 5 deletions Sources/InfomaniakCore/Networking/ApiError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ public enum InfomaniakError: Error {
@objc public class LoginApiError: NSObject, Codable {
@objc public let error: String
@objc public let errorDescription: String?

enum CodingKeys: String, CodingKey {
case error
case errorDescription = "error_description"
}
}

open class ApiError: Codable, Error {
Expand Down
6 changes: 3 additions & 3 deletions Sources/InfomaniakCore/Networking/ApiResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ open class ApiResponse<ResponseContent: Decodable>: Decodable {
case total
case pages
case page
case itemsPerPage = "items_per_page"
case responseAt = "response_at"
case itemsPerPage
case responseAt
case cursor
case hasMore = "has_more"
case hasMore
}

public required init(from decoder: Decoder) throws {
Expand Down

0 comments on commit e0eca07

Please sign in to comment.