Skip to content

Latest commit

 

History

History
44 lines (29 loc) · 1.9 KB

File metadata and controls

44 lines (29 loc) · 1.9 KB

v3.0.0 - Changelog & Migration Guide

Endpoints 3.0.0 introduces new native async APIs as well as a lot of other new features, therefore it was necessary to break some of our interfaces.

Changelog

Developer facing

  • Removed wrapping withCheckedContinuation functions and rewrote APIs in a native async way
    • Dropped AsyncXXXX prefixed components because async is the only supported way
    • Adopted tests based on that change
  • Validation
    • Request and Response validation is now triggered in the Session dataTask function.
  • Added EndpointsTestbed as an example project
  • Updated README.md based on the new APIs
  • Endpoints now throws and EndpointsError containing some additional information about the request/response

Internal

  • Github Workflow
    • Added SwiftFormat workflow
    • Updated Checkout action to v4
  • Updated Ruby gems
  • Added new copyright statement in code
  • Updated .gitignore

Migration Guide

Session

The start function was removed please use dataTask(for: MyCall()) now. This functions also calls parse() call.validate() and client.validate. The funciton signatures changed because of async usage, please adopt them according to the new parameters and response types.

Client

Client now directly conforms to ResponseValidator. The encode(...), parse(...) and validate(...) functions have now a new function signature as well. If a custom manipulation is requires, those can be overwritten. An example can be found here.

Call

For the Call protocol the validation function signature changed. Be aware that this is not a compiler error!

DataParser

The DataParser protocols' parse function signatures was changed as well. Adopt accordingly.