diff --git a/src/caoscrawler/validator.py b/src/caoscrawler/validator.py index 5610470389580d8f11c9782a63023da1c98f5ef8..bb21a6117cc95c60450a6b6c8e26d165640c10b9 100644 --- a/src/caoscrawler/validator.py +++ b/src/caoscrawler/validator.py @@ -134,6 +134,14 @@ def validate(records: list[db.Record], schemas: list[dict]) -> list[tuple[bool, - Index 0: A boolean that determines whether at least one schema matched for this record. - Index 1: A list of schemas matching the record at this position of the list `records`. """ + + # TODO: + # I think it makes sense to change the behavior as follows: + # - Only validate the schema that was generated for a specific record type that matches the parent + # record that is validated. + # - With this behavior for each record a single schema is matched, and if it does not match the + # validation error can be returned. + retval = [] for r in records: matching_schemas = []