In case you were wondering (like I was) whether an Apex menu would automatically hide a parent entry in a menu if all its children are not shown - it doesn't :-)
While adding some authorizations to menu items (both parents and children), I wondered if Apex might do this automatically.
On the one hand it makes sense, because you might end up with an "empty" parent entry if all children are hidden.
But on the other hand, if the parent has a target itself (which I don't like from a GUI point of view, but it is possible), that would not make sense.
So I checked it by making a simple menu with an Autorization Scheme (auth X) that allowed no access.
And it turns out Apex applies no logic to the menu whatsoever. Which seems like the right choice to me.
For example (entries with "auth X" give no access here):
This results in a menu with Parents 1 (without Child 1) and Parent 2 (with Child 2).
If Apex was trying to be smart here, it would not have shown Parent 1 at all.