private function getRouteName(ResourceMetadata $resourceMetadata, string $operationName, string $operationType): ?string
    {
        if (OperationType::ITEM === $operationType) {
            return $resourceMetadata->getItemOperationAttribute($operationName, 'route_name');
        }

        return $resourceMetadata->getCollectionOperationAttribute($operationName, 'route_name');
    }