text: from rest_framework import serializers as ser
  from api.base.serializers import (JSONAPISerializer, IDField, TypeField, LinksField)
  
  
  class MetaSchemaSerializer(JSONAPISerializer):
  
      id = IDField(source='_id', read_only=True)
      type = TypeField()
  
      name = ser.CharField(read_only=True)
      schema_version = ser.IntegerField(read_only=True)
      schema = ser.DictField(read_only=True)
      active = ser.BooleanField(read_only=True)
  
      links = LinksField({
          'self': 'get_absolute_url'
      })
  
      def get_absolute_url(self, obj):
          return obj.absolute_api_v2_url
  
      class Meta:
          type_ = 'metaschemas'
  