private function fixForRelations(RelatedResourceInterface $resource): void
    {
        $relations = $resource->getRelations();

        foreach ($relations as $relation) {
            $routeHref = $relation->getHref();
            $href = $this->fixHref($routeHref);
            $relation->setHref($href);
        }
    }