You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/share/templates/api/swaggerui.tt

75 lines
2.5 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Sipwise NGCP HTTP API documentation (version 2)</title>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
<link rel="stylesheet" href="/static/css/sipwise-apidoc.css">
<link rel="stylesheet" type="text/css" href="/static/js/swaggerui/swagger-ui.css" >
</head>
<body>
[% UNLESS c.req.params.iamverysureallowdestructive %]
<style>
/* disable the try it out buttons */
.opblock-post button.btn.try-out__btn,
.opblock-put button.btn.try-out__btn,
.opblock-patch button.btn.try-out__btn,
.opblock-delete button.btn.try-out__btn {
display: none;
}
</style>
[% END %]
[%
chapters = [
{ level = 2, id = 'intro', title = 'Introduction', },
{ level = 2, id = 'auth', title = 'Authentication', },
{ level = 2, id = 'chswaggerui', title = 'API', noswclass = 1, },
];
-%]
<h1>Sipwise NGCP HTTP API Documentation</h1>
<div class="content">
<div class ="sipwclass">
See the old API documentation <a href="/api/?oldapidoc=1">here</a>
</div>
<div class ="sipwclass">
NGCP API 2.0 documentation is available <a href="/api/v2">here</a>
</div>
<div class="chapter sipwclass">
<h2 class="nocount">Table of Contents</h2>
<nav>
<ol>
[% FOR chapter IN chapters %]
[% IF loop.prev && loop.prev.level > chapter.level -%]
</ol></li>
[% END -%]
<li><a href="#[% chapter.id %]">[% chapter.title %]</a>
[% IF loop.next && loop.next.level > chapter.level -%]
<ol>
[% ELSE -%]
</li>
[% END -%]
[% END -%]
</ol>
</nav>
</div>
[% FOR chapter IN chapters -%]
[% IF loop.prev && loop.prev.level >= chapter.level -%]
<div class="pagebreak"></div>
[% END -%]
<div class="chapter[% UNLESS chapter.noswclass; ' sipwclass'; END; %]">
[%
t = 'api/root/' _ chapter.id _ '.tt';
INCLUDE $t level=chapter.level title=chapter.title id=chapter.id uri=chapter.uri;
-%]
</div>
[% END -%]
</div>
</body>
</html>
[% # vim: set tabstop=4 syntax=html expandtab: -%]