{%- macro restriction(inner_text, css_class_name) -%}
{{ inner_text }}
{%- endmacro -%} {%- macro tabbed_section(operator, property, property_path, index) -%}{{ property.const | python_to_json }}
{%- endif -%}
{%- if "pattern" in property -%}
Must match regular expression: {{ property.pattern }}
{%- endif -%}
{%- if type == "string" -%}
{%- if "minLength" in property -%}
{{ restriction("Must be at least " ~ property.minLength ~ "
characters long", "min-length") }}
{%- endif -%}
{%- if "maxLength" in property -%}
{{ restriction("Must be at most " ~ property.maxLength ~ "
characters long", "max-length") }}
{%- endif -%}
{%- endif -%}
{%- if type in ["integer", "number"] -%}
{%- set restriction_text = (property | get_numeric_restrictions_text("", "
")) -%}
{%- if restriction_text -%}
{{ restriction(property | get_numeric_restrictions_text("", "
"), "numeric") }}
{%- endif -%}
{%- endif -%}
{%- if type.startswith("array") -%}
{%- if "minItems" in property -%}
{{ restriction("Must contain a minimum of " ~ property.minItems ~ "
items", "min-items") }}
{%- endif -%}
{%- if "maxItems" in property -%}
{{ restriction("Must contain a maximum of " ~ property.maxItems ~ "
items", "max-items") }}
{%- endif -%}
{%- if "uniqueItems" in property and property.uniqueItems == True -%}
{{ restriction("All items must be unique", "unique-items") }}
{%- endif -%}
{%- if "items" in property and property["items"] is mapping and property["items"] != {} -%}