false
false
Determines the depth of relator
s to use for included resources.
PLEASE TAKE CAUTION: If this property is Infinity
, performance can
degrade significantly. It is RECOMMENDED to use more requests rather
than a single one if such depth is required since included resources can be
inhomogenous thus difficult to traverse.
Must be a number in [0, Infinity]
.
0
Replaced by include
The key name for the identifier in the resource.
"id"
Which resources to include. See docs
If passed as a numeric value, all related resources will be included up to the given depth.
If provided this will superceed the use of depth
If not provided, or explicitly nullish, then behaviour will default to using depth
If provided as an empty array, then no relationships will be included.
A set of options for constructing top-level links.
Optional
document?: Linker<[nullish | SingleOrArray<PrimaryType>]>A Linker that gets represents a top-level self link.
Optional
paginator?: Paginator<PrimaryType>A Paginator to use for pagination links.
Optional
resource?: Linker<[PrimaryType]>A Linker that represents a resource-level self link.
A dictionary of Metaizers to use in different locations of the document.
Optional
document?: Metaizer<[nullish | SingleOrArray<PrimaryType>]>Constructs metadata for the top level.
Optional
jsonapi?: Metaizer<[]>Constructs metadata for the JSON:API Object.
Optional
resource?: Metaizer<[PrimaryType]>Constructs metadata for the resource objects
Whether to use null
value the data
field.
This option will ignore options onlyIdentifier, linkers.resource, and metaizers.resource (and all options they ignores).
false
Whether to only serialize the identifier.
This option will ignore the options depth
false
This is used to serialize the resource linkages only. The value must be the name of a collection for a relator in the relators option.
Only a single primary datum (as opposed to an array) MUST be serialized.
This option will ignore the options projection, linkers.resource, and metaizers.resource.
An object of 0 OR 1 (NOT BOTH) to denote hide or show attributes respectively.
If set (directly) to undefined
, then the attributes
field will be left undefined
.
If set to null
, then every attribute will show.
If set to {}
, then every attribute will hide.
null
Optional
relatorsA Relator that generates relationships
for a given primary resource.
Note: You can add more relators by using Serializer.setRelators. This is useful in case you have a cycle of relators among serializers.
See relationships objects for more information.
The highest JSON API version supported. Set to null
to omit version.
1.0
Generated using TypeDoc
Whether to make primary data as an included resource and use resource identifier objects for top-level data.