mirror of
https://github.com/OMGeeky/google-apis-rs.git
synced 2026-01-21 10:38:25 +01:00
fix some errors where some stuff does not exist
all apis libs build now
This commit is contained in:
@@ -75,11 +75,24 @@ def find_enums_in_context(c: Context) -> list:
|
||||
enums = {}
|
||||
for k, s in c.schemas.items():
|
||||
if UNUSED_TYPE_MARKER not in schema_markers(s, c, transitive=True):
|
||||
# properties = s.get('properties')
|
||||
properties = s.get('properties')
|
||||
# printed_name = False
|
||||
if s.properties:
|
||||
for pv, pk in zip(s.properties.values(), s.properties.keys()):
|
||||
enums = _add_enum_value(k, pk, pv, enums)
|
||||
if properties:
|
||||
try:
|
||||
p = properties.to_dict()
|
||||
vals = p.values()
|
||||
keys = p.keys()
|
||||
|
||||
for pv, pk in zip(vals, keys):
|
||||
enums = _add_enum_value(k, pk, pv, enums)
|
||||
except TypeError as e:
|
||||
print('exception in find_enums_in_context:', e)
|
||||
print('k:', k)
|
||||
print('s:', s)
|
||||
print('props:', properties)
|
||||
print('props type:', type(properties))
|
||||
# print('c:', c)
|
||||
raise e
|
||||
|
||||
for k, v in c.fqan_map.items():
|
||||
# print(k)
|
||||
|
||||
@@ -75,7 +75,14 @@ impl Default for Scope {
|
||||
/// ${e.description}
|
||||
% endif
|
||||
pub enum ${enum_type} {
|
||||
% for (variant_name,description) in zip(e.get('enum'), e.get('enumDescriptions')):
|
||||
<%
|
||||
enum_names = e.get('enum')
|
||||
enum_descriptions = e.get('enumDescriptions')
|
||||
if not enum_descriptions:
|
||||
enum_descriptions = ['no description found'] * len(enum_names)
|
||||
|
||||
%>\
|
||||
% for (variant_name,description) in zip(enum_names, enum_descriptions):
|
||||
<% #print(variant_name, '=>', description)
|
||||
%>
|
||||
% if description:
|
||||
|
||||
Reference in New Issue
Block a user