def get_serializer_class(self):
    """ An authenticated user looking at their own user object gets more data """
if self.get_object() == self.request.user:
    return SelfUserSerializer
return UserSerializer
Django REST Framework — Сериализация необязательных полей