public function merge(self $definition)
    {
        if ($this->type === null && $definition->hasType()) {
            $this->type = $definition->getType();
        }

        $this->mergeLinks($definition);
        $this->mergeAttributes($definition);
        $this->mergeRelationships($definition);
    }