{% macro print_prop(name, types, description, prefix) -%}
{% set descr_suffix = description.splitlines()[0]|d('') -%}
{% set descr_lines = description.splitlines()[1:]|d([]) -%}
{{prefix}}* **{{name}}:** ({{types}}){{ descr_suffix }}
{% for line in descr_lines -%}
{{prefix ~ '  '}}{{ line }}
{% endfor -%}
{%- endmacro -%}
{% set ns = namespace(is_obj_type=false) -%}
{% if ('properties' in prop_cfg or 'patternProperties' in prop_cfg) %}{% set ns.is_obj_type = true -%}{% endif -%}
{% for key, val in prop_cfg.get('items', {}).items() -%}
  {% if key in ('properties', 'patternProperties') -%}{% set ns.is_obj_type = true -%}{% endif -%}
  {% if key == 'oneOf' -%}
    {% for oneOf in val -%}
      {% if ('properties' in oneOf or 'patternProperties' in oneOf ) -%}{% set ns.is_obj_type = true -%}{% endif -%}
    {% endfor -%}
  {% endif -%}
{% endfor -%}
{% if ns.is_obj_type -%}
{% set description = description ~ " Each object in **" ~ name ~ "** list supports the following keys:" -%}
{% endif -%}
{{ print_prop(name, types, description, prefix ) -}}
