Index: src/Plugin/rest/resource/RestMenuItemsResource.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/Plugin/rest/resource/RestMenuItemsResource.php	(revision d0df40b18ce8dd2e269fb7f303abf7f854cb3503)
+++ src/Plugin/rest/resource/RestMenuItemsResource.php	(revision )
@@ -207,10 +207,11 @@
       /* @var $url \Drupal\Core\Url */
       $url = $item_value['url'];
 
-      $external = $url->isExternal();
+      $external = FALSE;
       $uuid = '';
-      if ($external) {
+      if ($url->isExternal()) {
         $uri = $url->getUri();
+        $external = TRUE;
         $absolute = $uri;
       }
       else {
@@ -228,31 +229,34 @@
               ->load($params[$entity_type]);
             $uuid = $entity->uuid();
           }
-        } catch (\UnexpectedValueException $e) {
+        }
+        catch (\UnexpectedValueException $e) {
           $absolute = $uri = '';
         }
       }
 
       $alias = $this->aliasManager->getAliasByPath("/$uri");
 
-      $items[$item_name] = [
-        'key' => $item_name,
-        'title' => $org_link->getTitle(),
-        'description' => $org_link->getDescription(),
-        'uri' => $uri,
-        'alias' => ltrim($alias, '/'),
+      $items[] = [
+        'key'      => $item_name,
+        'title'    => $org_link->getTitle(),
+        'uri'      => $uri,
+        'alias'    => ltrim($alias, '/'),
         'external' => $external,
         'absolute' => $absolute,
-        'weight' => $org_link->getWeight(),
+        'weight'   => $org_link->getWeight(),
         'expanded' => $org_link->isExpanded(),
-        'enabled' => $org_link->isEnabled(),
-        'uuid' => $uuid,
-        'options' => $options,
+        'enabled'  => $org_link->isEnabled(),
+        'uuid'     => $uuid,
+        'options'     => $options,
       ];
 
+      end($items);
+      $item_key = key($items);
+
       if (!empty($item_value['below'])) {
-        $items[$item_name]['below'] = [];
-        $this->getMenuItems($item_value['below'], $items[$item_name]['below']);
+        $items[$item_key]['below'] = [];
+        $this->getMenuItems($item_value['below'], $items[$item_key]['below']);
       }
     }
   }
