Add tests for BasicJSONAPIError and tweak documentation

This commit is contained in:
Mathew Polzin
2019-09-29 15:20:08 -07:00
parent 88c5d400aa
commit b0801f7cee
3 changed files with 105 additions and 0 deletions
@@ -70,4 +70,9 @@ public struct BasicJSONAPIErrorPayload<IdType: Codable & Equatable>: Codable, Eq
/// a good option if you do not know what to expect. You could also use
/// `Either<Int, String>` (provided by the `Poly` package that is
/// already a dependency of `JSONAPI`).
///
/// - Important: The `definedFields` property will include fields
/// with non-nil values in a flattened way. There will be no `source` key
/// but there will be `pointer` and `parameter` keys (if those values
/// are non-nil).
public typealias BasicJSONAPIError<IdType: Codable & Equatable> = GenericJSONAPIError<BasicJSONAPIErrorPayload<IdType>>