{% from "macro_restriction.jinja2" import restriction with context %} {% macro tabbed_section(operator, current_node) %} {% include "tabbed_section.jinja2" %} {% endmacro %} {% macro content(schema, skip_headers=False) %} {% set keys = schema.keywords %} {# Resolve type #} {% set type_name = schema.type_name %} {% if not skip_headers %} {% if config.show_breadcrumbs %} {% include "breadcrumbs.jinja2" %} {% endif %} {# Display type #} {% if not schema is combining %}
{{ schema.kw_const.raw | python_to_json }}
{% endif %}
{# Pattern (Regular Expression) #}
{% if schema.kw_pattern %}
Must match regular expression: {{ schema.kw_pattern.literal | escape }}
{% endif %}
{# Conditional subschema, or if-then-else section #}
{% if schema.has_conditional %}
{% include "section_conditional_subschema.jinja2" %}
{% endif %}
{# Required properties that are not defined under "properties". They will only be listed #}
{% include "section_undocumented_required_properties.jinja2" %}
{# Show the requested type(s) #}
{% include "badge_type.jinja2" %}
{# Show array restrictions #}
{% if type_name.startswith("array") %}
{% include "section_array.jinja2" %}
{% endif %}
{# Display examples #}
{% set examples = schema.examples %}
{% if examples %}
{% include "section_examples.jinja2" %}
{% endif %}
{# Properties, pattern properties, additional properties #}
{% for sub_property in schema.iterate_properties %}
{% include "section_properties.jinja2" %}
{% endfor %}
{% endif %}
{% endif %}
{% endmacro %}