Commit Graph

  • d6e82fab55 get id and type tests into the encoded entity test function Mathew Polzin 2018-12-21 08:53:55 -08:00
  • 5fa9848f02 test some attribute encoding a bit further Mathew Polzin 2018-12-21 08:45:51 -08:00
  • f38399a1d6 Add a bit of entity structure testing Mathew Polzin 2018-12-21 07:50:32 -08:00
  • 28f664326d Added a couple of tests Mathew Polzin 2018-12-12 21:05:07 -08:00
  • 3b7ef4aeb9 Add access to easy optional access to entire data on Document.Body Mathew Polzin 2018-12-12 20:05:29 -08:00
  • bb1ed30e89 Rename Document.Body.primaryData to primaryResource Mathew Polzin 2018-12-12 20:04:14 -08:00
  • dfdc266645 remove a bunch of convenience initializers that appeared to be giving the compiler some strife 0.10.0 Mathew Polzin 2018-12-10 22:45:28 -08:00
  • 585cad0a83 Added literal initialization for nullable Attributes (TestLib) Mathew Polzin 2018-12-10 21:50:30 -08:00
  • 89abdd4cca fix example code in Playground Mathew Polzin 2018-12-10 21:11:48 -08:00
  • 67a43be26c update linuxmain 0.9.0 Mathew Polzin 2018-12-08 20:05:00 -08:00
  • 8f279ce191 Add tests around nullable attributes and remove unnecessary encoding code Mathew Polzin 2018-12-08 20:04:11 -08:00
  • c9d388579f Made it much more convenient to work with Non-EntityType relationships. Discovered and fixed a bug where nullable relationships were encoded incorrectly. Mathew Polzin 2018-12-08 19:48:10 -08:00
  • 1061283905 loosen the grip entity had on Ids Mathew Polzin 2018-12-08 01:17:47 -08:00
  • 08949d0a93 Move encoding error type to its own file. Restructure Relatable and OptionalRelatable to not be dependent upon EntityDescription Mathew Polzin 2018-12-08 00:36:05 -08:00
  • 3047e2d23a Add access to computed attributes that are not AttributeType Mathew Polzin 2018-12-07 21:19:08 -08:00
  • 41a2a01788 Added support for relationship operator ~> to optional relationships Mathew Polzin 2018-12-07 20:59:39 -08:00
  • 53f7f55e07 Add Poly7 and Include7 because why not Mathew Polzin 2018-12-06 18:38:20 -08:00
  • d8d030286d Add a little bit of code doc Mathew Polzin 2018-12-06 18:12:56 -08:00
  • 005a981bf7 Add a couple of missing initializers to Entity Mathew Polzin 2018-12-05 22:51:12 -08:00
  • fad45203dd small refactor to consider ToOneRelationship with no meta or links to be even more synonymous with 'pointer' Mathew Polzin 2018-12-05 22:42:34 -08:00
  • 3468cb555a Remove Result dependency in favor of a super stripped down internally scoped Result enum. This won't interfere with other Result libraries and I was not exposing the Result anyway. 0.8.1 Mathew Polzin 2018-12-05 22:02:59 -08:00
  • 8defe82536 Update README and linuxmain 0.8.0 Mathew Polzin 2018-12-05 18:33:07 -08:00
  • 1f83216b03 Adding a few tests here and there Mathew Polzin 2018-12-05 18:31:53 -08:00
  • 6e6973c170 Adding test coverage for Relationship Meta and Links Mathew Polzin 2018-12-05 18:12:00 -08:00
  • 4f52cc2fd1 update README Mathew Polzin 2018-12-05 17:30:48 -08:00
  • 35d6cbb440 Add support for Relationship Meta and Links (untested) Mathew Polzin 2018-12-05 09:14:38 -08:00
  • d667e91a6a Add some missing initializers for Entity and fix Playground sources. 0.7.1 Mathew Polzin 2018-12-03 19:08:09 -08:00
  • 75c8ce7405 Update linuxmain 0.7.0 Mathew Polzin 2018-12-03 18:46:03 -08:00
  • 3a8237ec0f Add test coverage for Meta and Links on Entity Mathew Polzin 2018-12-03 18:45:07 -08:00
  • 49e33baa96 give all top-level-ish headers the JSONAPI prefix Mathew Polzin 2018-12-03 18:14:05 -08:00
  • f2a9b5a7b9 That should do the trick Mathew Polzin 2018-12-03 18:10:36 -08:00
  • 24baadd7a8 try to make headers unique Mathew Polzin 2018-12-03 18:09:40 -08:00
  • 8d18be6154 Update README after adding Meta and Links to Entity. Mathew Polzin 2018-12-03 18:04:53 -08:00
  • 8aa887b527 Add metadata and links to resource objects (i.e. Entity). untested. Mathew Polzin 2018-12-02 22:57:59 -08:00
  • 7d0a686dd9 update linuxmain Mathew Polzin 2018-12-02 21:39:45 -08:00
  • e4eb7816d7 Added an APIDescription type to Document that supports the JSON API Spec's JSON:API Object. Mathew Polzin 2018-12-02 21:35:09 -08:00
  • 482174f5b4 update linuxmain Mathew Polzin 2018-12-02 01:44:02 -08:00
  • 339480264e Add JSON:API Object to Document as the APIDescription type. Begin to add testing around this new type. Mathew Polzin 2018-12-02 01:43:27 -08:00
  • 5d666ec998 move entity validator (i.e. check function) section of project status into a TestLib subsection. Mathew Polzin 2018-12-01 09:58:07 -08:00
  • 9cacbe9b8b Revamp project status section and remove old todo list items. Mathew Polzin 2018-12-01 09:55:31 -08:00
  • 6663ad042e A cleanup and clarification pass at the README 0.6.0 Mathew Polzin 2018-12-01 01:13:05 -08:00
  • 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. Mathew Polzin 2018-12-01 00:36:39 -08:00
  • 8274ecb523 Add tests confirming that initializers work as expected without using any TestLib conveniences Mathew Polzin 2018-11-30 23:56:18 -08:00
  • 853c7e892a Fix playground bug caused by not running after removing a typealias Mathew Polzin 2018-11-30 20:18:08 -08:00
  • 04bf96a0cf update linuxmain 0.5.1 Mathew Polzin 2018-11-29 20:13:21 -08:00
  • 8668311307 better poly proxy tests Mathew Polzin 2018-11-29 20:10:56 -08:00
  • 689517c633 Add ability to differentiate between things that _act_ like Entities and things that _are_ entities in the sense that the latter are persisted between client and server but the former is just a clientside convenience. Mathew Polzin 2018-11-29 20:03:44 -08:00
  • 65b80ee0eb Add ReversibleTransformer and tests. remove unneeded check in Entity.check(). Mathew Polzin 2018-11-29 18:39:59 -08:00
  • e91a03b396 Expose initializer for Document.Body.Data Mathew Polzin 2018-11-29 13:37:06 -08:00
  • 82088c7852 Remove BodyData which just aliased Body.Data Mathew Polzin 2018-11-29 13:15:07 -08:00
  • 34a4c8e7fc Add TestLib ability to represent to-one relationships with the values of their IDs. Mathew Polzin 2018-11-29 11:31:17 -08:00
  • 6aeb859c24 Remove now deleted test from linuxmain 0.5.0 Mathew Polzin 2018-11-28 21:13:47 -08:00
  • 163ac94c51 I did some more type wrangling to finally get the Id type to specialize on Entity rather than EntityDescription. The compiler gets into trouble depending on which of a few semantically identical routes are taken, but I finally stumbled upon the correct combination of protocols and extensions to get the job done. this was always the ideal outcome, but I was not sure the Swift compiler would allow it. Mathew Polzin 2018-11-28 21:13:07 -08:00
  • e67b9fc142 Update playground and README for computed attributes. Mathew Polzin 2018-11-28 09:20:50 -08:00
  • a628992fcb Make Attribute a Functor to make computed attributes easier to write. Mathew Polzin 2018-11-28 09:09:23 -08:00
  • cf47f88a61 Add tests to confirm that Entities can safely have computed attributes or relationships. Mathew Polzin 2018-11-28 08:15:57 -08:00
  • 0425e2adcb rename folder in tests Mathew Polzin 2018-11-28 07:50:47 -08:00
  • d3763ba713 Add array literal expressibility for ToManyRelationship Mathew Polzin 2018-11-27 23:59:12 -08:00
  • fcc1796731 Expose Entity properties on EntityType protocol. 0.4.4 Mathew Polzin 2018-11-27 18:58:48 -08:00
  • 921bcef05d Ids are now Hashable 0.4.3 Mathew Polzin 2018-11-27 18:39:57 -08:00
  • 661ff6eca5 A little renaming and easier access to important types under the JSONAPIDocument protocol 0.4.2 Mathew Polzin 2018-11-27 18:20:01 -08:00
  • e36180c9b9 Make properties of Body.Data public Mathew Polzin 2018-11-27 18:05:02 -08:00
  • abee0c4d0e Add body variable to JSONAPIDocument protocol 0.4.1 Mathew Polzin 2018-11-27 17:55:56 -08:00
  • 9c8b2fbebb Renamed JSONAPIDocument to Document and created a protocol describing a JSONAPI Document. 0.4.0 Mathew Polzin 2018-11-27 17:35:13 -08:00
  • a9ef71f383 indentation change Mathew Polzin 2018-11-27 17:15:15 -08:00
  • 232554ec51 Wrap JSONAPIDocument body up a bit nicer for use when the JSONAPIDocument does not represent errors. 0.3.0 Mathew Polzin 2018-11-27 16:12:36 -08:00
  • 8f36bb40e3 Add note about the library being a bit 'opinionated' Mathew Polzin 2018-11-27 14:04:53 -08:00
  • 55f2f52676 minor README change Mathew Polzin 2018-11-27 13:59:01 -08:00
  • dd5f3b1737 Added check for nullable array attributes Mathew Polzin 2018-11-27 13:57:55 -08:00
  • 7d7b3d7f19 Update linuxmain Mathew Polzin 2018-11-27 13:34:22 -08:00
  • aedd5dc29b Add Entity validation via a function in JSONAPITestLib. Mathew Polzin 2018-11-27 13:33:55 -08:00
  • 3964202ea2 Mention JSONAPITestLib in the README Mathew Polzin 2018-11-27 11:53:21 -08:00
  • dcabafd583 Add a playground page to show off JSONAPITestLib and add nil literal expressibility to ToOneRelationship Mathew Polzin 2018-11-27 11:45:15 -08:00
  • 9df9efc2dc rename NoRelatives to NoRelationships to better pair with NoAttributes and NoLinks Mathew Polzin 2018-11-27 11:08:53 -08:00
  • a55a4cbed0 Added test library, attribute literal expressibility, and tests Mathew Polzin 2018-11-27 10:54:51 -08:00
  • 6f6ed87b4c Update included playground Mathew Polzin 2018-11-27 09:14:47 -08:00
  • 59ff145aa8 Rename the included Error type. Mathew Polzin 2018-11-27 09:11:13 -08:00
  • 20a685e67b Add goal of making it easier to construct Attributes values Mathew Polzin 2018-11-26 22:29:31 -08:00
  • 3d8d10584b Add typealiases to make accessing Entity Relationships and Attributes types more convenient Mathew Polzin 2018-11-26 22:27:10 -08:00
  • b93580c900 Allow ManyResourceBody to use any PrimaryResource type Mathew Polzin 2018-11-26 18:57:34 -08:00
  • 8927938d56 Rename URL to JSONAPIURL to avoid conflict with Foundation.URL Mathew Polzin 2018-11-26 18:29:24 -08:00
  • 372e2de721 update linuxmain 0.2.0 Mathew Polzin 2018-11-25 20:07:47 -08:00
  • 1a2ba17f02 more documentation updates Mathew Polzin 2018-11-25 20:06:27 -08:00
  • 9f2c7aa2e4 Update README Mathew Polzin 2018-11-25 19:48:50 -08:00
  • 650937dbb9 improve test coverage of some JSONAPIDocument accessors. Mathew Polzin 2018-11-25 19:41:10 -08:00
  • b08cbdb0ae Add some tests around documents with links. Mathew Polzin 2018-11-25 19:12:30 -08:00
  • c30a2615f2 Added links to document but currently untested Mathew Polzin 2018-11-25 00:02:37 -08:00
  • 86e87ebf5d Add Links and tests Mathew Polzin 2018-11-24 22:46:53 -08:00
  • 987bf2b750 Update linuxmain Mathew Polzin 2018-11-23 20:54:41 -08:00
  • af1aca9cf4 More failure test cases. pretty ok test coverage at this point. Mathew Polzin 2018-11-23 20:44:12 -08:00
  • b97649fab6 Add some failure testing Mathew Polzin 2018-11-23 20:34:43 -08:00
  • 8114132189 Add attribute validation tests Mathew Polzin 2018-11-23 20:21:00 -08:00
  • b61a41c99b Allow EntityType and Poly to be PrimaryResource in JSONAPIDocument Mathew Polzin 2018-11-23 19:33:06 -08:00
  • 16b83ddbef lots of tests of Poly Mathew Polzin 2018-11-23 19:09:53 -08:00
  • 6dff02bd51 Update to version of Result that does not even import Foundation for tests Mathew Polzin 2018-11-23 08:58:13 -08:00
  • 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. Mathew Polzin 2018-11-23 08:49:55 -08:00
  • 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. Mathew Polzin 2018-11-22 22:52:21 -08:00
  • 399644b62a update readme Mathew Polzin 2018-11-22 22:23:44 -08:00
  • 3b1e5f7414 Switched to a fork of the Result repo that does not depend on Foundation (outside of tests) Mathew Polzin 2018-11-22 22:08:18 -08:00
  • bf842bd781 Remove a couple unneeded Foundation imports that snuck in Mathew Polzin 2018-11-22 21:35:58 -08:00