Add OpenAPI to documentation
Change-Id: I49a372d346bdea68dfae3e169bd62822a0259218
diff --git a/templates/doc/api.html.ep b/templates/doc/api.html.ep
index 54174e7..3836981 100644
--- a/templates/doc/api.html.ep
+++ b/templates/doc/api.html.ep
@@ -6,8 +6,17 @@
The specification for KoralQuery is available on <%= ext_link_to 'GitHub', "http://korap.github.io/Koral" %>.
All API endpoints either use KoralQuery or are (more or lest) REST-ful web APIs.</p>
-<p>All publicly available API endpoints including their requests and responses are described in the <%= ext_link_to 'GitHub Wiki', "https://github.com/KorAP/Kustvakt/wiki" %> of <%= embedded_link_to 'doc', 'Kustvakt', 'korap', 'kustvakt' %>.</p>
+<p>All publicly available API endpoints (partially experimental) including their requests and responses are described in the <%= ext_link_to 'GitHub Wiki', "https://github.com/KorAP/Kustvakt/wiki" %> of <%= embedded_link_to 'doc', 'Kustvakt', 'korap', 'kustvakt' %>.</p>
% my $api_url = $c->url_for('proxy' => (apiv => $Kalamar::API_VERSION))->to_abs->scheme('https');
% $api_url->path->trailing_slash(1);
+
+%if ($c->app->config('Kalamar')->{openapi}) {
+<p id="openapi">
+% my $openapi= $api_url->to_abs;
+% $openapi->path->merge($c->app->config('Kalamar')->{openapi})->trailing_slash(1);
+The OpenAPI documentation is described <%= ext_link_to 'here', $openapi %>.
+</p>
+% }
+
<p>The root service can be found at <code id="api-service-uri"><%= $api_url %></code>.</p>