Closed
Description
According to the API section of the documentation, "The JSONRenderer
exposes a number of methods that you may override if you need highly custom rendering control." However, many of these methods are actually static and there are hardcoded calls to them in the code, making them unoverridable. For example:
@staticmethod
def extract_relationships(fields, resource, resource_instance):
# Avoid circular deps
from rest_framework_json_api.relations import ResourceRelatedField
# ...
@staticmethod
def build_json_resource_obj(fields, resource, resource_instance, resource_name):
# ...
relationships = JSONRenderer.extract_relationships(fields, resource, resource_instance)
Shouldn't these be classmethods instead?
Metadata
Metadata
Assignees
Labels
No labels