Set resource key in serializer