Skip to main content

rename_attribute

Function rename_attribute 

Source
pub fn rename_attribute(
    document: &mut Value,
    types: &[&str],
    from: &str,
    to: &str,
)
Expand description

Renames an attribute of the listed resource types, and moves error pointers that name it, so /data/attributes/full_name becomes /data/attributes/name and /full_name becomes /name.