

def determine_metadata(self, request, view):
    'Adds `properties` and `features` to the metadata response.'
    metadata = super(DynamicMetadata, self).determine_metadata(request, view)
    metadata['features'] = getattr(view, 'features', [])
    if hasattr(view, 'get_serializer'):
        serializer = view.get_serializer(dynamic=False)
        if hasattr(serializer, 'get_name'):
            metadata['resource_name'] = serializer.get_name()
        if hasattr(serializer, 'get_plural_name'):
            metadata['resource_name_plural'] = serializer.get_plural_name()
    metadata['properties'] = self.get_serializer_info(serializer)
    return serializer

dataset/ETHPy150Open AltSchool/dynamic-rest/dynamic_rest/metadata.py DynamicMetadata.determine_metadata/VarMisuse@126/191 `metadata`->`serializer`