public List<NodeType> getTopoOrdering() {
        Set<NodeType> visited = new HashSet<>();

        List<NodeType> result = new LinkedList<>();
        for (NodeType node : parentsOfNode.keySet()) {
            if (visited.contains(node)) continue;

            getAllAncestorsImpl(node, result, visited);
        }

        return result;
    }
@return a list of all registered documents in topological order
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/index/InheritanceGraph.java