private static void readCustomMetadata(JsonValueAdapter element, JsonSchemaObjectImpl object) {
    if (!(element instanceof JsonObjectValueAdapter)) return;
    List<JsonSchemaMetadataEntry> filters = new ArrayList<>();
    for (JsonPropertyAdapter adapter : ((JsonObjectValueAdapter)element).getPropertyList()) {
      String name = adapter.getName();
      if (name == null) continue;
      Collection<JsonValueAdapter> values = adapter.getValues();
      if (values.size() != 1) continue;
      JsonValueAdapter valueAdapter = values.iterator().next();
      if (valueAdapter.isStringLiteral()) {
        filters.add(new JsonSchemaMetadataEntry(name, Collections.singletonList(getString(valueAdapter))));
      }
      else if (valueAdapter.isArray()) {
        filters.add(new JsonSchemaMetadataEntry(name,
                                                Objects.requireNonNull(valueAdapter.getAsArray()).getElements().stream()
          .filter(v -> v.isStringLiteral())
          .map(v -> getString(v))
          .toList()));
      }
    }
    object.setMetadata(filters);
  }
private static void readCustomMetadata(JsonValueAdapter element, JsonSchemaObjectImpl object)