Skip to content

2.0.0-beta.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@DenTelezhkin DenTelezhkin released this 21 Sep 08:58
· 286 commits to main since this release

IMPORTANT Please check out meta-ticket, discussing response serialization changes in beta-2. Feedback is really important for next betas and final release.

  • Parseable protocol was rewritten from generic static func to having associatedtype and a func inside. This is done to broaden support for any kinds of mappers. Good example would be CoreData objects creation, that requires different contexts for background threads, and was difficult to implement using old syntax.
  • All TRON request methods now contain obligatory responseParser and errorParser properties, that define, how response and errors are parsed.
  • APIStub objects are now using responseParser and errorParser of the request, and therefore have been entirely rewritten with new properties, that accept Data objects instead of directly setting result.
  • JSONDecodable protocol now provides convenience methods to use with TRON and APIRequest, that work the same as before, therefore almost maintaining backwards code compatibility for TRON/SwiftyJSON subspec.
  • ErrorBuilder class was removed.