public function  patchDraftAction($type, $uid, Request $request)
    {
        $operations = $request->request->all();
        try {
            (new OperationSyntaxValidator())->validate($operations);
        } catch (InvalidOperationSyntaxException $e) {
            throw new BadRequestHttpException('operation invalid syntax: ' . $e->getMessage());
        }

        $this->granted('EDIT', $content = $this->getClassContentByTypeAndUid($type, $uid));

        foreach($operations as $operation) {
            if (
                PatcherInterface::REPLACE_OPERATION !== $operation['op'] ||
                '/revision' !== $operation['path']
            ) {
                throw new UnauthorizedPatchOperationException($content, $operation['path'], $operation['op']);
            }

            $revision = (int) $operation['value'];
            if (0 >= $revision) {
                $revision += $content->getRevision();
            }

            try {
                $this->getClassContentManager()->revertToRevision($content, $revision);
                $this->getEntityManager()->flush();
            } catch (\InvalidArgumentException $e) {
                throw new NotFoundHttpException(sprintf('Unknown revision %d for content %s.', $revision, $content->getObjectIdentifier()), $e);
            }
        }

        return $this->createJsonResponse(null, 204);
    }