{% for code, definition in operation.responses.items() %}

{% if code == "default" -%} {{texts.other_responses}} {%- else -%} Response {{code}} {%- with phrase = get_http_status_phrase(code) -%} {%- if phrase -%}  {{ phrase }} {%- endif -%} {%- endwith -%} {%- endif %}

{%- if is_reference(definition) -%} {%- with type_name = definition["$ref"].replace("#/components/responses/", "") %}

Refer to the common response description: {{type_name}}.

{%- endwith -%} {%- endif -%} {%- if definition.content %} {%- with content = handler.simplify_content(definition.content) %} {% for content_type, definition in content.items() %} === "{{content_type}}" {% include "partial/content-examples.html" %} {% if "alt_types" in definition %}{{texts.other_possible_types}}: {{definition.alt_types | join(", ")}}{% endif %} ??? hint "{{texts.schema_of_the_response_body}}" ```json {{handler.write_content_schema(definition) | indent(8) | safe}} ``` {% endfor %} {% endwith -%} {% endif -%} {%- if definition.headers %}

{{texts.response_headers}}

{%- for header_name, header_definition in definition.headers.items() %} {%- endfor %}
{{texts.name}} {{texts.description}} {{texts.schema}}
{{header_name}} {{header_definition.description}} {%- with schema = header_definition.schema %} {%- include "partial/schema-repr.html" -%} {% endwith -%}
{% endif -%} {%- endfor -%}