New testing feature and _much_ better errors
- Adds
JSONAPITestingframeworkcompare(to:)functions that deliver concise comparisons of two documents or resource objects. Just print theString(describing:)a comparison to get a human readable description of the differences. - Adds
ResourceObjectDecodingErrorandDocumentDecodingErrorwhich represent more JSON:API-specific errors and come with good string descriptions for many common reasons why JSON:API resources or documents could fail to decode. Just catch the error from decoding aResourceObjectorDocumentand save or printString(describing: error).
📛 Renames JSONAPIDocument to CodableJSONAPIDocument.
📛 Renames OptionalPrimaryResource to OptionalCodablePrimaryResource.
📛 Renames PrimaryResource to CodablePrimaryResource.
📛 Renames ResourceBody to CodableResourceBody.
📛 Renames PolyWrapped to CodablePolyWrapped.
📛 Renames SingleResourceBody.Entity to SingleResourceBody.PrimaryResource
📛 Renames ManyResourceBody.Entity to ManyResourceBody.PrimaryResource
📛 Renames JSONAPIEncodingError to JSONAPICodingError
⛔️ Deprecates subscript access of ResourceObject attributes in favor of key path dynamic member lookup.
🗑 Removes key path dynamic member lookup of Document properties on Document.SuccessDocument and Document.ErrorDocument in favor of directly providing relevant accessors (see SuccessDocument/ErrorDocument for details).