-
Notifications
You must be signed in to change notification settings - Fork 37
Closed
Description
The JSON API spec states that resources can contain their own meta information:
https://jsonapi.org/format/#document-resource-objects
meta: a meta object containing non-standard meta-information about a resource that can not be represented as an attribute or relationship.
Note that this is different than top level (root) meta or relationship level meta. This is meta information that appears on each resource object.
I don't see a way to include resource meta using the serializer.
Trying to include a meta
object or function when I register my type throws an error:
serializer.register( "Activity", {
id: "activityId",
whitelist: [ "name" ],
topLevelMeta: { ... }, // <- Not the same as resource level meta
meta: { ... } // <- Throws an error
});
Error: ValidationError: "meta" is not allowed
Is it possible to include resource level meta information?
Metadata
Metadata
Assignees
Labels
No labels