{% set custom_props = datacontract.customProperties if datacontract.customProperties is defined and datacontract.customProperties is not callable else [] %} {% if custom_props is mapping %} {% set custom_props = custom_props.items() | list %} {% set is_mapping = true %} {% else %} {% set is_mapping = false %} {% endif %} {% set has_props = (is_mapping and custom_props|length > 0) or (not is_mapping and custom_props is sequence and custom_props is not string and custom_props|length > 0) %} {% if has_props %}

Custom Properties

This section covers other properties you may find in a data contract.

{% if is_mapping %} {% for key, value in custom_props %}
{{ key }}
{% if value is mapping or (value is sequence and value is not string) %} {{ value | tojson }} {% elif value is sameas true %} true {% elif value is sameas false %} false {% else %} {{ value }} {% endif %}
{% endfor %} {% else %} {% for prop in custom_props %} {% if prop.property is defined %}
{{ prop.property }} {% if prop.description is defined and prop.description %} {% endif %}
{% if prop.value is defined %} {% if prop.value is mapping or (prop.value is sequence and prop.value is not string) %} {{ prop.value | tojson }} {% elif prop.value is sameas true %} true {% elif prop.value is sameas false %} false {% else %} {{ prop.value }} {% endif %} {% endif %}
{% endif %} {% endfor %} {% endif %}
{% endif %}