protected function formatCaseOfValidationMessages($replacements)
    {
        $errorKey = Config('api.errorFormat.errors');
        if (array_key_exists($errorKey, $replacements)) {
            $errorMessages = $replacements[$errorKey];

            if (Config(APIBoilerplate::CASE_TYPE_CONFIG_PATH) == APIBoilerplate::CAMEL_CASE) {
                $errorMessages = camel_case_array_keys($errorMessages);
            } else {
                $errorMessages = snake_case_array_keys($errorMessages);
            }

            $replacements[$errorKey] = $errorMessages;
        }

        return $replacements;
    }