{% from "./partials/operation.html" import operation %}

<a name="operations"></a>
<h2 class="ml-8">Operations</h2>

{% for channelName, channel in asyncapi.channels() %}
  <div class="responsive-container">
    {% if channel.hasPublish() %}
      {{ operation(channel.publish(), 'publish', channelName, channel) }}
    {% endif %}
  </div>
  <div class="responsive-container">
    {% if channel.hasSubscribe() %}
      {{ operation(channel.subscribe(), 'subscribe', channelName, channel) }}
    {% endif %}
  </div>
{% endfor %}
