mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-02-23 15:49:49 +01:00
fix(types): nested types work for arrays
Thanks to removed code which made no sense to me, I put in a bug. Now the code is back, beta than ever, and documented as well :).
This commit is contained in:
@@ -340,10 +340,14 @@ def iter_nested_types(schemas):
|
||||
ns.id = nested_type_name(prefix, pn)
|
||||
ns[NESTED_TYPE_MARKER] = True
|
||||
|
||||
# To allow us recursing arrays, we simply put items one level up
|
||||
if 'items' in p:
|
||||
ns.update((k, deepcopy(v)) for k, v in p.items.iteritems())
|
||||
|
||||
yield ns
|
||||
|
||||
for np in iter_nested_properties(prefix + canonical_type_name(pn), ns.properties):
|
||||
yield np
|
||||
if 'properties' in ns:
|
||||
for np in iter_nested_properties(prefix + canonical_type_name(pn), ns.properties):
|
||||
yield np
|
||||
elif _is_map_prop(p):
|
||||
# it's a hash, check its type
|
||||
for np in iter_nested_properties(prefix, {pn: p.additionalProperties}):
|
||||
|
||||
Reference in New Issue
Block a user