31 Commits

Author SHA1 Message Date
Mathew Polzin b374367234 Move Poly into its own library. 2019-01-12 21:30:20 -08:00
Mathew Polzin 072b081ac3 Breaking - Rename static var type: String to static var jsonType:String to avoid unnecessary conflict with Swift.type(of:) 2019-01-02 19:35:50 -08:00
Mathew Polzin 897410492d Add much more substantial example to README and mirror it in the included playground. Add convenient methods for adding includes to a Document. Make Poly less picky about what type of things it contains (don't need to be entities anymore). Typealias Either to Poly2 because they are isomorphic. 2019-01-02 17:14:58 -08:00
Mathew Polzin d5a24c4adb Split Attribute out into its own Type (no longer just a type alias to TransformedAttribute) 2018-12-29 23:07:14 -08:00
Mathew Polzin 669d5d1342 Add ability to merge Document.Body.Data values 2018-12-28 19:11:24 -08:00
Mathew Polzin bb1ed30e89 Rename Document.Body.primaryData to primaryResource 2018-12-12 20:04:14 -08:00
Mathew Polzin dfdc266645 remove a bunch of convenience initializers that appeared to be giving the compiler some strife 2018-12-10 22:45:28 -08:00
Mathew Polzin 35d6cbb440 Add support for Relationship Meta and Links (untested) 2018-12-05 09:14:38 -08:00
Mathew Polzin 8aa887b527 Add metadata and links to resource objects (i.e. Entity). untested. 2018-12-02 22:57:59 -08:00
Mathew Polzin e4eb7816d7 Added an APIDescription type to Document that supports the JSON API Spec's JSON:API Object. 2018-12-02 21:35:09 -08:00
Mathew Polzin 339480264e Add JSON:API Object to Document as the APIDescription type. Begin to add testing around this new type. 2018-12-02 01:43:27 -08:00
Mathew Polzin 07402259c4 Add ability to specify that a SingleResourceBody should be optional or not (or specifically that its PrimaryResource is nullable or not). add tests. update documentation. 2018-12-01 00:36:39 -08:00
Mathew Polzin 9c8b2fbebb Renamed JSONAPIDocument to Document and created a protocol describing a JSONAPI Document. 2018-11-27 17:35:13 -08:00
Mathew Polzin 9df9efc2dc rename NoRelatives to NoRelationships to better pair with NoAttributes and NoLinks 2018-11-27 11:08:53 -08:00
Mathew Polzin 59ff145aa8 Rename the included Error type. 2018-11-27 09:11:13 -08:00
Mathew Polzin 8927938d56 Rename URL to JSONAPIURL to avoid conflict with Foundation.URL 2018-11-26 18:29:24 -08:00
Mathew Polzin 650937dbb9 improve test coverage of some JSONAPIDocument accessors. 2018-11-25 19:41:10 -08:00
Mathew Polzin b08cbdb0ae Add some tests around documents with links. 2018-11-25 19:12:30 -08:00
Mathew Polzin c30a2615f2 Added links to document but currently untested 2018-11-25 00:02:37 -08:00
Mathew Polzin b97649fab6 Add some failure testing 2018-11-23 20:34:43 -08:00
Mathew Polzin 8114132189 Add attribute validation tests 2018-11-23 20:21:00 -08:00
Mathew Polzin b61a41c99b Allow EntityType and Poly to be PrimaryResource in JSONAPIDocument 2018-11-23 19:33:06 -08:00
Mathew Polzin 3c5a356b44 Add a couple more tests around metadata. 2018-11-22 21:14:19 -08:00
Mathew Polzin c4032eb351 Added meta data to JSONAPIDocument. Added tests around JSONAPIDocument error finally. Needs a few more tests around metadata. 2018-11-22 21:04:58 -08:00
Mathew Polzin 032cf42c08 Add support for encoding JSONAPIDocument and add tests. Fix support for decoding null primary data for single resource document. 2018-11-16 23:59:49 -08:00