Skip to content

Commit a438761

Browse files
it lives
1 parent 8c3e44e commit a438761

File tree

2 files changed

+513
-6
lines changed

2 files changed

+513
-6
lines changed

linodecli/baked/util.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ def _handle_schema(_schema: Schema):
3939

4040
_handle_schema(schema)
4141

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))
42+
for field in ["oneOf", "anyOf", "allOf"]:
43+
for i, entry in enumerate(getattr(schema, field) or []):
44+
if isinstance(entry, dict):
45+
entry = Schema(
46+
schema.path + [field, i + 1], entry, schema._root
47+
)
48+
49+
_handle_schema(entry)
4850

4951
return (
5052
properties,

0 commit comments

Comments
 (0)