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: Swift.DecodingError.keyNotFound when decoding Traits #71

Merged
merged 1 commit into from
Nov 18, 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
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Identity.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ public struct Identity: Decodable, Sendable {

public let flags: [Flag]
public let traits: [Trait]
public let transient: Bool
public let transient: Bool?
}
2 changes: 1 addition & 1 deletion FlagsmithClient/Classes/Trait.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct Trait: Codable, Sendable {
/// - note: In the future, this can be renamed back to 'value' as major/feature-breaking
/// updates are released.
public var typedValue: TypedValue
public let transient: Bool
public let transient: Bool?
/// The identity of the `Trait` when creating.
internal let identifier: String?

Expand Down
3 changes: 2 additions & 1 deletion FlagsmithClient/Classes/Traits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public let traits: [Trait]
public let identifier: String?
public let flags: [Flag]
public let transient: Bool
public let transient: Bool?

init(traits: [Trait], identifier: String?, flags: [Flag] = [], transient: Bool = false) {
self.traits = traits
Expand All @@ -30,3 +30,4 @@
try container.encode(transient, forKey: .transient)
}
}

Check warning on line 33 in FlagsmithClient/Classes/Traits.swift

View workflow job for this annotation

GitHub Actions / swift-lint

Trailing Newline Violation: Files should have a single trailing newline (trailing_newline)
Loading