private function resolveAllOfTree(ValidationField $field) {
        $result = [];

        foreach($field->getAllOf() as $allof) {
            if (!is_array($allof) || empty($allof)) {
                throw new ParseException("Invalid allof member in {$field->getSchemaPath()}, array expected", 500);
            }

            list ($items, $schemaPath) = $this->lookupSchema($allof, $field->getSchemaPath());

            $allOfValidation = new ValidationField(
                $field->getValidation(),
                $items,
                '',
                $schemaPath,
                $field->getOptions()
            );

            if($allOfValidation->hasAllOf()) {
                $result = array_replace_recursive($result, $this->resolveAllOfTree($allOfValidation));
            } else {
                $result = array_replace_recursive($result, $items);
            }
        }

        return $result;
    }