@@ -23,16 +23,7 @@ def _aggregate_schema_properties(
2323 properties = {}
2424 required = defaultdict (lambda : 0 )
2525
26- def _handle_schema (path : List [str ], data : Dict [str , Any ]):
27- # We accept data as a dict here to prevent and parsing edge cases
28- for i , entry in enumerate (data .get ("oneOf" , [])):
29- _handle_schema (path + ["oneOf" , i ], entry )
30-
31- for i , entry in enumerate (data .get ("allOf" , [])):
32- _handle_schema (path + ["allOf" , i ], entry )
33-
34- _schema = Schema (path , data , schema ._root )
35-
26+ def _handle_schema (_schema : Schema ):
3627 if _schema .properties is None :
3728 return
3829
@@ -46,7 +37,14 @@ def _handle_schema(path: List[str], data: Dict[str, Any]):
4637 for key in _schema .required :
4738 required [key ] += 1
4839
49- _handle_schema (schema .path , schema .raw_element )
40+ _handle_schema (schema )
41+
42+ one_of = schema .oneOf or []
43+ any_of = schema .anyOf or []
44+
45+ for entry in one_of + any_of :
46+ # pylint: disable=protected-access
47+ _handle_schema (Schema (schema .path , entry , schema ._root ))
5048
5149 return (
5250 properties ,
0 commit comments