          # Related fields.
          if isinstance(field, serializers.ManyRelatedField):
              return {
                  'type': 'array',
                  'items': self._map_field(field.child_relation)
              }
          if isinstance(field, serializers.PrimaryKeyRelatedField):
              model = getattr(field.queryset, 'model', None)
              if model is not None:
                  model_field = model._meta.pk
 
</s> remove             data = self._map_serializer(field)
 </s> add             data = self.map_serializer(field) </s> remove         elif self._get_serializer(path, method) is not None:
            name = self._get_serializer(path, method).__class__.__name__
 </s> add         elif self.get_serializer(path, method) is not None:
            name = self.get_serializer(path, method).__class__.__name__ </s> remove                 mapping['items'] = self._map_field(field.child)
 </s> add                 mapping['items'] = self.map_field(field.child) </s> remove             return self._map_choicefield(field)
 </s> add             return self.map_choicefield(field) </s> remove                 'items': self._map_serializer(field.child)
 </s> add                 'items': self.map_serializer(field.child)
                'items': self.map_field(field.child_relation)
          # Related fields.
          if isinstance(field, serializers.ManyRelatedField):
              return {
                  'type': 'array',
                'items': self.map_field(field.child_relation)
              }
          if isinstance(field, serializers.PrimaryKeyRelatedField):
              model = getattr(field.queryset, 'model', None)
              if model is not None:
                  model_field = model._meta.pk
keep keep keep keep replace keep keep keep keep keep
 Convert openapi.AutoSchema methods to public API. 
rest_framework/schemas/openapi.py