public function createAction(Request $request, Lesson $lesson, Chapter $parent)
    {
        $this->checkPermission('EDIT', $lesson->getResourceNode(), [], true);

        $newChapter = $this->chapterManager->createChapter($lesson, json_decode($request->getContent(), true), $parent);

        return new JsonResponse($this->chapterSerializer->serialize($newChapter));
    }