Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove remaining explicit snake case coding keys #143

Merged
merged 4 commits into from
Dec 5, 2024
Merged
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
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
Loading