private Set<String> collectTextItemsFromArrayNode(JsonNode arrayNode) {
        if (!arrayNode.isArray()) {
            return null;
        }
        Set<String> textItems = new LinkedHashSet<>();
        for (JsonNode item : arrayNode) {
            if (!item.isTextual()) {
                return null;
            }
            textItems.add(item.asText());
        }
        return textItems;
    }
Unpack the given array of texts.

@param arrayNode the node to unpack
@return all contained text items; or {@code null} if given node is not an array or any item is not a text
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/impl/SchemaCleanUpUtils.java