-
data
-
included
-
errors
-
meta
-
jsonapi
(i.e. API Information) -
links
-
id
-
type
-
attributes
-
relationships
-
links
-
meta
-
data
-
links
-
meta
-
id
-
type
-
meta
-
href
-
meta
- Support transforms on
Attributes
values (e.g. to support different representations ofDate
) - Support validation on
Attributes
. - Support sparse fieldsets (encoding only). A client can likely just define a new model to represent a sparse population of another model in a very specific use case for decoding purposes. On the server side, sparse fieldsets of Resource Objects can be encoded without creating one model for every possible sparse fieldset.
- Disallow optional array in
Attribute
(should be empty array, notnull
). - Only allow
TransformedAttribute
and its derivatives as stored properties withinAttributes
struct. Computed properties can still be any type because they do not get encoded or decoded. - Only allow
MetaRelationship
,ToManyRelationship
andToOneRelationship
withinRelationships
struct.
These ideas could be implemented in future versions.
- (Maybe) Use
KeyPath
to specifyIncludes
thus creating type safety around the relationship between a primary resource type and the types of included resources. - (Maybe) Replace
SingleResourceBody
andManyResourceBody
with support at theDocument
level to just interpretPrimaryResource
,PrimaryResource?
, or[PrimaryResource]
as the same decoding/encoding strategies. - Support sideposting. JSONAPI spec might become opinionated in the future (json-api/json-api#1197, json-api/json-api#1215, json-api/json-api#1216) but there is also an existing implementation to consider (https://jsonapi-suite.github.io/jsonapi_suite/ruby/writes/nested-writes). At this time, any sidepost implementation would be an awesome tertiary library to be used alongside the primary JSONAPI library. Maybe
JSONAPISideloading
. - Error or warning if an included resource object is not related to a primary resource object or another included resource object (Turned off or at least not throwing by default).