fix(ingestion/extractor): accept bool type in json-schema extractor
closes #15421
Fix for Boolean Schema Properties in JSON Schema Ingestion
What: Fixed TypeError: argument of type 'bool' is not iterable when JSON schema properties are set to boolean values.
Root cause
Methods expected Dict but received bool when properties were set to true/false per JSON Schema spec.
Code Analysis
Main file: metadata-ingestion/src/datahub/ingestion/extractor/json_schema_util.py
-> Code expected all schemas to be Dict objects
-> Crashed at Ellipsis in schema and "key" in schema checks when schema was boolean
-> Boolean schemas are valid per JSON Schema: true = accepts any JSON, false = never validates
Solution
-> Added isinstance(schema, bool) checks before Ellipsis in schema -> Convert boolean → {} dict at property iteration
This PR prevents crashes throughout the call chain for bool type
Unit test results:
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: All tests successful. No failed tests found.
:loudspeaker: Thoughts on this report? Let us know!
@btkcodedev Thanks for the contribution
@btkcodedev , Please take care of the comment from @sgomezvillamor