pub fn build_request_body<Id, F>( type_schema: &TypeSchema, attrs: &JsonMap, resolved: &BTreeMap<Uid, Id>, encode_ref: F, ) -> Result<Value>where F: Fn(&Id) -> Value + Copy,