mirror of
https://github.com/encounter/JSONAPI.git
synced 2026-03-30 11:18:38 -07:00
Add idea of using KeyPaths to specify includes on a JSONAPIDocument
This commit is contained in:
@@ -59,7 +59,7 @@ The primary goals of this framework are:
|
||||
- [ ] `links`
|
||||
- [ ] `meta`
|
||||
|
||||
### EntityDescription Validator
|
||||
### EntityDescription Validator (using reflection)
|
||||
- [ ] Disallow optional array in `Attribute` and `Relationship` (should be empty array, not `null`).
|
||||
- [ ] Only allow `Attribute` and `TransformAttribute` within `Attributes` struct.
|
||||
- [ ] Only allow `ToManyRelationship` and `ToOneRelationship` within `Relationships` struct.
|
||||
@@ -72,8 +72,8 @@ The primary goals of this framework are:
|
||||
- [x] Support ability to distinguish between `Attributes` fields that are optional (i.e. the key might not be there) and `Attributes` values that are optional (i.e. the key is guaranteed to be there but it might be `null`).
|
||||
- [x] Fix `ToOneRelationship` so that it is possible to specify an optional relationship where the value is `null` rather than the key being omitted.
|
||||
- [ ] Conform to `CustomStringConvertible`
|
||||
- [ ] Use `KeyPath` to specify `Includes` thus creating type safety around the relationship between a primary resource type and the types of included resources????
|
||||
- [x] For `NoIncludes`, do not even loop over the "included" JSON API section if it exists.
|
||||
- [ ] `EntityDescription` validator (using reflection)
|
||||
- [ ] Property-based testing (using `SwiftCheck`)
|
||||
- [ ] Roll my own `Result` or find an alternative that doesn't use `Foundation`.
|
||||
- [ ] Create more descriptive errors that are easier to use for troubleshooting.
|
||||
|
||||
Reference in New Issue
Block a user