              return []
  
          fields = []
  
          serializer_class = view.get_serializer_class()
          serializer = serializer_class()
  
          if isinstance(serializer, serializers.ListSerializer):
              return coreapi.Field(name='data', location='body', required=True)
  
 
</s>
        if not (hasattr(view, 'get_serializer_class') and callable(getattr(view, 'get_serializer_class'))):
            return []

              return []
  
          fields = []
  
        if not (hasattr(view, 'get_serializer_class') and callable(getattr(view, 'get_serializer_class'))):
            return []

          serializer_class = view.get_serializer_class()
          serializer = serializer_class()
  
          if isinstance(serializer, serializers.ListSerializer):
              return coreapi.Field(name='data', location='body', required=True)
  
keep keep keep add keep keep keep keep keep keep
 Fix schema generation for APIView, since it does not have get_serializer_class method. (#4285)
rest_framework/schemas.py