@@ -18,23 +18,33 @@ highly custom rendering control.
18
18
19
19
Builds the ` attributes ` object of the JSON API resource object.
20
20
21
- #### extract_relationships(fields, resource, resource_instance)
21
+ #### extract_relationships
22
+
23
+ ` extract_relationships(fields, resource, resource_instance) `
22
24
23
25
Builds the ` relationships ` top level object based on related serializers.
24
26
25
- #### extract_included(fields, resource, resource_instance, included_resources)
27
+ #### extract_included
28
+
29
+ ` extract_included(fields, resource, resource_instance, included_resources) `
26
30
27
31
Adds related data to the top level ` included ` key when the request includes ` ?include=example,example_field2 `
28
32
29
- #### extract_meta(serializer, resource)
33
+ #### extract_meta
34
+
35
+ ` extract_meta(serializer, resource) `
30
36
31
37
Gathers the data from serializer fields specified in ` meta_fields ` and adds it to the ` meta ` object.
32
38
33
- #### extract_root_meta(serializer, resource, meta)
39
+ #### extract_root_meta
40
+
41
+ ` extract_root_meta(serializer, resource, meta) `
34
42
35
43
Calls a ` get_root_meta ` function on a serializer, if it exists.
36
44
37
- #### build_json_resource_obj(fields, resource, resource_instance, resource_name)
45
+ #### build_json_resource_obj
46
+
47
+ `build_json_resource_obj(fields, resource, resource_instance, resource_name)g
38
48
39
49
Builds the resource object (type, id, attributes) and extracts relationships.
40
50
0 commit comments