Expand description
Helpers for writing VersionChange transforms over JSON:API documents and plain JSON.
Functions§
- add_
attribute - Adds an attribute where it is missing, such as one a newer version removed.
- map_
attributes - Applies a callback to the attributes of each resource whose type is listed (or every
resource when
typesis empty). A plain JSON object counts as one resource’s attributes. - remove_
attribute - Removes an attribute of the listed resource types.
- rename_
attribute - Renames an attribute of the listed resource types, and moves error pointers that name it,
so
/data/attributes/full_namebecomes/data/attributes/nameand/full_namebecomes/name. - rename_
key - Renames a key in place, keeping the order of the keys.
- types
- The resource types in a JSON:API document, in
dataandincluded.