title: Custom endpoint with basic serializer?
body: <p>In my model's viewset, I have created a custom endpoint and I'm trying to serialize some quick meta information to send out. </p>
  
  <p>Endpoint Declaration:</p>
  
  <pre><code>@list_route(methods=['get'], url_path='meta')
  def get_meta_details(self, request):
      serializer = ThingMetaSerializer
      return Response(serializer.data)
  </code></pre>
  
  <p>ThingMetaSerializer:</p>
  
  <pre><code>class ThingMetaSerializer(serializers.Serializer):
  
      some_data = serializers.SerializerMethodField(method_name='ret_zero')
  
      def ret_zero(self):
          return 0
  </code></pre>
  
  <p>Every time I run the endpoint I get the following error:</p>
  
  <blockquote>
    <p>TypeError(repr(o) + " is not JSON serializable")</p>
  </blockquote>
  
  <p>Any idea how I can make this work?</p>
  
  <p>Edit: </p>
  
  <p>I made this work using the following code in the viewset:</p>
  
  <pre><code>meta_data = {
      'some_data': 0,
  }
  
  @list_route(methods=['get'], url_path='meta')
  def get_meta_details(self, request):
      # do some calculations
      return JsonResponse(self.meta_data)
  </code></pre>
  
  <p>However this method does not auto generate into the Django RF Schema. If there is a better way of doing this I would love to know.</p>