Skip to content

Commit 844a155

Browse files
committed
add required property support
1 parent 1bdebbf commit 844a155

File tree

1 file changed

+2
-3
lines changed
  • src/neo4j_graphrag/experimental/components

1 file changed

+2
-3
lines changed

src/neo4j_graphrag/experimental/components/schema.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,7 +670,7 @@ def _filter_properties_required_field(
670670
self, node_types: List[Dict[str, Any]]
671671
) -> List[Dict[str, Any]]:
672672
"""Sanitize the 'required' field in node type properties. Ensures 'required' is a valid boolean.
673-
converts known string values (true, yes, 1, false, no, 0) to booleans and removes unrecognized values.
673+
converts known string values (true, yes, 1, false, no, 0) to booleans and removes unrecognized values.
674674
"""
675675
for node_type in node_types:
676676
properties = node_type.get("properties", [])
@@ -711,7 +711,7 @@ def _filter_properties_required_field(
711711
logging.info(
712712
f"Removing unrecognized 'required' value '{required_value}' "
713713
f"for property '{prop_name}' on node '{node_label}'. "
714-
f"Using default (False) " # TODO: Not sure if we have to convert it to the default value - double check!
714+
f"Using default (False) " # TODO: Not sure if we have to convert it to the default value - double check!
715715
)
716716
prop.pop("required", None)
717717
else:
@@ -725,7 +725,6 @@ def _filter_properties_required_field(
725725

726726
return node_types
727727

728-
729728
def _clean_json_content(self, content: str) -> str:
730729
content = content.strip()
731730

0 commit comments

Comments
 (0)