{% assign known_keys = 'type $ref items description properties required name in schema allOf' %} {% assign type = include.type %} {% if type.type %} {% if type.items %}
Array of {% assign subtype = type.items %} {% assign count = subtype|size %} {% include type.html type=subtype %} {% assign type = include.type %}
{% else %} {{ type.type | capitalize }} {% endif %} {% if type.properties %}
Object properties:
{% assign props = type.properties %} {% assign required = type.required|join: ' ' %} {% for prop in props %}
{{ prop[0] }} {% if required contains prop[0] %} {% endif %} : {% assign value_type = prop[1] %} {% include type.html type=value_type %} {% assign type = include.type %}
{% endfor %}
{% endif %} {% elsif type.schema %} {% assign type2 = type.schema %} {% include type.html type=type2 %} {% assign type = include.type %} {% elsif type['$ref'] %} {% assign def = type['$ref'] | split: '/' | last %} {{ def }} {% else%} - {% endif %} {% if type.allOf %}
Mixin:
    {%for mix in type.allOf %}
  1. {% include type.html type=mix %} {% assign type = include.type %}
  2. {% endfor %}
{% endif %} {% for key in type %} {% unless known_keys contains key[0] %}
{% if key[0] == 'enum' %} {% assign value = key[1] | join: ', ' %} {% else %} {% assign value = key[1] %} {% endif %} {{ key[0] }}: {% include yaml.html data=value %}
{% endunless %} {% endfor %} {% if type.description %}
{{type.description| newline_to_br| markdownify }}
{% endif %}