Skip to content

Commit b0d8ba8

Browse files
committed
add note on self-requirement
1 parent ad8661a commit b0d8ba8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ Examples:
1111

1212
### Limitations
1313

14+
`ResponseParseable` and `JSONDecodable` are now Self-requirement protocols with all their limitations. Apart from that, there are some other limitations as well:
15+
1416
#### Subclasses
1517

1618
Subclassing ResponseParseable requires explicit typealias in subclassed model:
@@ -29,12 +31,10 @@ class Sibling: Ancestor {
2931

3032
[Discussion in mailing Swift mailing lists](https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20151228/004645.html)
3133

32-
3334
#### Multiple custom mappers
3435

3536
Current architecture does not support having more than one mapper in your project, because Swift is unable to differentiate between two ResponseParseable extensions on different types.
3637

37-
3838
#### Arrays and CollectionTypes
3939

4040
Currently, there's no way to extend CollectionType or Array with `JSONDecodable` or `ResponseParseable` protocol, so creating request with ModelType of array(APIRequest<[Foo],Bar>) is not possible.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ There are also default implementations of `JSONDecodable` protocol for Swift bui
186186

187187
Starting with 0.2.0, we are adding support for any custom mapper to be used with TRON. Now, instead of JSONDecodable, all generic constraints on TRON accept `ResponseParseable` protocol, that can be easily implemented for your mapper.
188188

189-
By default, we are using SwiftyJSON, and adding protocol default implementations on it, so existing code should not break.
189+
By default, we are using SwiftyJSON, and adding protocol default implementations on it.
190190

191191
**Note** Custom mappers are supported only when installing framework from CocoaPods due to inability of Carthage to split framework to subspecs.
192192

0 commit comments

Comments
 (0)