protected function initializeActionMethodArguments()
    {
        if ($this->getOriginalRequest()->getControllerActionName() === 'index') {
            switch ($this->request->getHttpRequest()->getMethod()) {
                case 'POST':
                case 'PUT':
                    $arguments = $this->request->getArguments();
                    if (!isset($arguments[$this->resourceArgumentName])) {
                        $arguments[$this->resourceArgumentName] = [];
                    }
                    $arguments[$this->resourceArgumentName] = array_merge_recursive($arguments[$this->resourceArgumentName],
                        $this->extractRequestBody());
                    $this->request->setArguments($arguments);
                    break;
            }
        }
        parent::initializeActionMethodArguments();
    }