in scripts/generators/markdown_fields.py [0:0]
def render_nestings_reuse_section(fieldset):
"""Renders the reuse section entries.
:param fieldset: The target fieldset
"""
if not fieldset.get('reused_here'):
return None
rows = []
for reused_here_entry in fieldset['reused_here']:
rows.append({
'flat_nesting': "{}.*".format(reused_here_entry['full']),
'name': reused_here_entry['schema_name'],
'short': reused_here_entry['short'],
'beta': reused_here_entry.get('beta', ''),
'normalize': reused_here_entry.get('normalize')
})
return sorted(rows, key=lambda x: x['flat_nesting'])