{% import "type_name.html" as common %}

<h5 class="title is-5 type-heading" id="service-{{ service.full_name }}">
  <a href="#service-{{ service.full_name }}" title="{{ service.full_name }}">service {{ service.name }}</a>
  {% if service.repository_url %}
    <a class="type-source-link" href="{{ service.repository_url }}">{{ service.source_file_path }}</a>
  {% endif %}
</h5>

<div class="block content">
  <p>{{ service.description_html | safe }}</p>
</div>

{% for method in service.methods %}
<div class="box">
  <h6 class="title is-6">rpc <code>{{ method.name }} ({{ common.type_name(method.request) | trim }}) -> {{ common.type_name(method.response) }}</code></h6>

  {% if method.description_html %}
  <div class="block">
    <p>{{ method.description_html | safe }}</p>
  </div>
  {% endif %}
</div>
{% endfor %}
