-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
53: Add support to Encodable types for addDocuments function r=curquiza a=ppamorim ## Summary - Function `addDocuments<T>` added. Now it's possible to send objects that are `Codable/Encodable` and the SDK will automatically encode the values to JSON. A custom encoder can be set by adding `encoder` in the call. ## Additions - Fixed bug in the `ClientTests.swift` file ## Local tests - [X] Unit tests passed - [X] Integration tests passed ## Problems Users are forced to wrap the object to `[]` when using `addDocuments` function with objects that are `Codable/Encodable`. I tried to create a wrapper function for this but Swift doesn't like the direct conversion from `T` to `[T]`. Co-authored-by: Pedro Paulo de Amorim <[email protected]>
- Loading branch information
Showing
6 changed files
with
199 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters