private static boolean isEmptyObject(Node node) {
        return node.asObjectNode().filter(ObjectNode::isEmpty).isPresent();
    }
Removes empty key-value pairs in the "components" of a model if empty, and
removes the "components" key-value pair of a model if it is empty.
smithy-openapi/src/main/java/software/amazon/smithy/openapi/fromsmithy/mappers/RemoveEmptyComponents.java