Commit Graph

35 Commits

Author SHA1 Message Date
Mathew Polzin dcabafd583 Add a playground page to show off JSONAPITestLib and add nil literal expressibility to ToOneRelationship 2018-11-27 11:45:15 -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 a55a4cbed0 Added test library, attribute literal expressibility, and tests 2018-11-27 10:54:51 -08:00
Mathew Polzin 59ff145aa8 Rename the included Error type. 2018-11-27 09:11:13 -08:00
Mathew Polzin 3d8d10584b Add typealiases to make accessing Entity Relationships and Attributes types more convenient 2018-11-26 22:27:10 -08:00
Mathew Polzin b93580c900 Allow ManyResourceBody to use any PrimaryResource type 2018-11-26 18:57:34 -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 c30a2615f2 Added links to document but currently untested 2018-11-25 00:02:37 -08:00
Mathew Polzin 86e87ebf5d Add Links and tests 2018-11-24 22:46:53 -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 16b83ddbef lots of tests of Poly 2018-11-23 19:09:53 -08:00
Mathew Polzin 2563edf419 Add subscript access to Poly types. Add empty test class for Poly type. Remove unneeded Foundation import. Small README change to read more clearly. 2018-11-23 08:49:55 -08:00
Mathew Polzin 98bb64268f Split Include1 through Include6 off to a new file and a type I am calling Poly. This new type will allow me to use the same structures to represent polymorphic relationships. 2018-11-22 22:52:21 -08:00
Mathew Polzin bf842bd781 Remove a couple unneeded Foundation imports that snuck in 2018-11-22 21:35:58 -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 7a3a1b8b65 Round off CustomStringConvertible implementations to make print output a lot easier to read. 2018-11-20 07:27:28 -08:00
Mathew Polzin 23d057c47b Adding more custom string convertible implementations to reduce the verbosity of printing to terminal. expose JSONAPIDocument.Include so that its constructor can be used. 2018-11-18 21:47:00 -08:00
Mathew Polzin 3327a93df5 Moved Examples.swift into a Playground, added some initialization code required to create entities and documents in code. 2018-11-18 17:47:26 -08:00
Mathew Polzin 072479c160 Move Transformer into its own class and add a Validator protocol based on Transformer 2018-11-18 15:49:06 -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
Mathew Polzin 04bd0421cd Added encoding support to Includes and tests 2018-11-16 23:15:25 -08:00
Mathew Polzin 9802efd917 Add encoding to ResourceBody and test it 2018-11-16 18:21:37 -08:00
Mathew Polzin 2ae92cf33f Add a bit more flavor to Examples.swift 2018-11-15 23:35:23 -08:00
Mathew Polzin 7dce7b2299 Remove Id from EntityDescription, reducing the amount of repetetive and clunky boilerplate and allowing one simple typealias to remove Ids from consideration entirely when creating new Entity types. 2018-11-15 23:02:58 -08:00