private static Set<String> getTypeNames(JsonNode node) {
    var result = new HashSet<String>();
    if (node.path("properties").size() > 0 || node.path("oneOf").size() > 0 || node.path("anyOf").size() > 0) {
      result.add("object");
    } else if (node.has("type") && node.get("type").isArray() && node.get("type").size() > 0) {
      for (JsonNode jsonNode : node.get("type")) {
        String typeName = jsonNode.asText();
        if (typeName != null && !typeName.equals("null")) {
          result.add(typeName);
        }
      }
    } else if (node.has("type") && node.get("type").isTextual()) {
      result.add(node.get("type").asText());
    } else {
      result.add(null);
    }
    return result;
  }
private static Set<String> getTypeNames(JsonNode node)