Skip to content

Commit 6578903

Browse files
committed
feat: added support for specifying arbitary primitive enum case values
1 parent 5873c3e commit 6578903

41 files changed

Lines changed: 3305 additions & 451 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Sources/MetaCodable/Codable/Codable.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
/// coding key path, with variable name as coding key.
1414
/// * Use ``CodedAt(_:)`` with no path arguments, when type is composition
1515
/// of multiple `Codable` types.
16-
/// * Use ``CodedAs(_:_:)`` to provide additional coding key values where
17-
/// field value can appear.
16+
/// * Use ``CodedAs(_:_:)-8wdaz`` to provide additional coding key values
17+
/// where field value can appear.
1818
/// * Use ``CodedBy(_:)`` to provide custom decoding/encoding behavior for
1919
/// `Codable` types or implement decoding/encoding for non-`Codable` types.
2020
/// * Use ``Default(_:)`` to provide default value when decoding fails.
21-
/// * Use ``CodedAs(_:_:)`` to provide custom values for enum cases.
21+
/// * Use ``CodedAs(_:_:)-8wdaz`` and ``CodedAs(_:_:)-4n3ze``
22+
/// to provide custom values for enum cases.
2223
/// * Use ``CodedAt(_:)`` to provide enum-case/protocol identifier tag path.
2324
/// * Use ``CodedAs()`` to provide enum-case/protocol identifier tag type.
2425
/// * Use ``ContentAt(_:_:)`` to provided enum-case/protocol content path.

Sources/MetaCodable/Codable/Decodable.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@
1616
/// of multiple `Decodable` types.
1717
/// * Use ``CodedBy(_:)`` to provide custom decoding behavior for
1818
/// `Decodable` types or implement decoding for non-`Decodable` types.
19+
/// * Use ``CodedAs(_:_:)-8wdaz`` to provide additional coding key values
20+
/// where field value can appear.
1921
/// * Use ``Default(_:)`` to provide default value when decoding fails.
20-
/// * Use ``CodedAs(_:_:)`` to provide custom values for enum cases.
22+
/// * Use ``CodedAs(_:_:)-8wdaz`` and ``CodedAs(_:_:)-4n3ze``
23+
/// to provide custom values for enum cases.
2124
/// * Use ``CodedAt(_:)`` to provide enum-case/protocol identifier tag path.
2225
/// * Use ``CodedAs()`` to provide enum-case/protocol identifier tag type.
2326
/// * Use ``ContentAt(_:_:)`` to provided enum-case/protocol content path.

Sources/MetaCodable/Codable/Encodable.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,12 @@
1414
/// coding key path, with variable name as coding key.
1515
/// * Use ``CodedAt(_:)`` with no path arguments, when type is composition
1616
/// of multiple `Encodable` types.
17-
/// * Use ``CodedAs(_:_:)`` to provide additional coding key values where
18-
/// field value can appear.
17+
/// * Use ``CodedAs(_:_:)-8wdaz`` to provide additional coding key values
18+
/// where field value can appear.
1919
/// * Use ``CodedBy(_:)`` to provide custom encoding behavior for
2020
/// `Encodable` types or implement encoding for non-`Encodable` types.
21-
/// * Use ``CodedAs(_:_:)`` to provide custom values for enum cases.
21+
/// * Use ``CodedAs(_:_:)-8wdaz`` and ``CodedAs(_:_:)-4n3ze``
22+
/// to provide custom values for enum cases.
2223
/// * Use ``CodedAt(_:)`` to provide enum-case/protocol identifier tag path.
2324
/// * Use ``CodedAs()`` to provide enum-case/protocol identifier tag type.
2425
/// * Use ``ContentAt(_:_:)`` to provided enum-case/protocol content path.

0 commit comments

Comments
 (0)