{% macro endpoints_start() %}
{{ name }}
{%- endmacro %} {% macro errors_start() %}{{ code }}
{{ msg }}{{ default }}
.{% elif value %} Value: {{ value }}
.{% endif %}{schema}://{host}{{ resource_url(resource) }}
{{ text }}
{% endmacro %} {% macro examples_start() %}{{ value }}
{%- endmacro -%}
{% macro schema_type(definition) -%}
{% if 'oneOf' in definition and definition|length == 1 %}
{% for schema in definition['oneOf'] %}
{{ schema_type_one(schema) }}{% if not loop.last %} or {% endif %}
{% endfor %}
{% else %}
{{ schema_type_one(definition) }}
{% endif %}
{% endmacro %}
{% macro schema_type_one(definition) -%}
{% if definition['type'] %}
{% if definition['type'] is string %}
{{ definition['type'] }}
{% else %}
{{ ' or '.join(definition['type']) }}
{% endif %}
{% elif 'enum' in definition['type'] %}
enum
{% else %}
unknown
{% endif %}
{%- endmacro %}
{% macro schema_description(definition, name, prefix) -%}
{% if 'oneOf' in definition and definition|length == 1 %}
{% for schema in definition['oneOf'] %}
{{ schema_description_one(schema, name, prefix) }}
{% endfor %}
{% else %}
{{ schema_description_one(definition, name, prefix) }}
{% endif %}
{%- endmacro %}
{% macro schema_description_one(definition, name, prefix) -%}
{% if definition['enum'] %}
{{ schema_enum(definition['enum']) }}{{ value }}
Field | Type | Description |
---|---|---|
{{ schema_field(name) }} | {{ schema_type(definition) }} | {{ schema_description(definition, name, prefix) }} |
Field | Type | Description |
---|---|---|
{{ schema_field(name) }} | {{ schema_type(field) }} | {{ schema_description(field) }} |