A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.
fix(core): check if input type is list
dextmorgnf49e05eafb54
diff --git a/flowsint-core/src/flowsint_core/core/services/type_registry_service.py b/flowsint-core/src/flowsint_core/core/services/type_registry_service.pyindex 270bd51f..82d67ffe 100644--- a/flowsint-core/src/flowsint_core/core/services/type_registry_service.py+++ b/flowsint-core/src/flowsint_core/core/services/type_registry_service.py@@ -358,10 +358,28 @@ class TypeRegistryService(BaseService):{"label": label, "value": label}for label in self._get_enum_values(details)]+ elif self._is_string_list(details):+ field["type"] = "list"field["required"] = self._is_required(details)return field+ def _is_string_list(self, schema: dict) -> bool:+ """Check if a field schema represents a List[str] type."""+ any_of = schema.get("anyOf", [])+ for entry in any_of:+ if (+ isinstance(entry, dict)+ and entry.get("type") == "array"+ and isinstance(entry.get("items"), dict)+ and entry["items"].get("type") == "string"+ ):+ return True+ # Direct array (non-optional)+ if schema.get("type") == "array" and isinstance(schema.get("items"), dict) and schema["items"].get("type") == "string":+ return True+ return False+def _has_enum(self, schema: dict) -> bool:any_of = schema.get("anyOf", [])return any(isinstance(entry, dict) and "enum" in entry for entry in any_of)