blob: 16246a39dc7740287facd52a411dd7cd8696b70d [file] [log] [blame]
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -07001<!-- Adapted from Swagger UI -->
2<!DOCTYPE html>
3<html>
4<head>
5 <title>ONOS API Docs</title>
6 <link rel="icon" type="image/png" href="images/onos-logo.png"/>
7
8 <link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
9 <link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
10 <link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
11 <link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
12 <link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
Jian Li8afbbee2016-07-27 19:16:51 +090013 <script src='lib/object-assign-pollyfill.js' type='text/javascript'></script>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070014 <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
15 <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
16 <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
17 <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
Jian Li7f6d0e9e2016-09-27 02:04:49 +090018 <script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
Jian Li8afbbee2016-07-27 19:16:51 +090019 <script src='lib/lodash.min.js' type='text/javascript'></script>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070020 <script src='lib/backbone-min.js' type='text/javascript'></script>
21 <script src='swagger-ui.js' type='text/javascript'></script>
Jian Li8afbbee2016-07-27 19:16:51 +090022 <script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
23 <script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
24 <script src='lib/jsoneditor.min.js' type='text/javascript'></script>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070025 <script src='lib/marked.js' type='text/javascript'></script>
26 <script src='lib/swagger-oauth.js' type='text/javascript'></script>
27
28 <script type="text/javascript">
29 $(function () {
30 var url = window.location.search.match(/url=([^&]+)/);
31 if (url && url.length > 1) {
32 url = decodeURIComponent(url[1]);
33 } else {
34 url = "/onos/v1/docs/apis/onos/v1/swagger.json";
35 }
Jian Li8afbbee2016-07-27 19:16:51 +090036
37 hljs.configure({
38 highlightSizeThreshold: 5000
39 });
40
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070041 window.swaggerUi = new SwaggerUi({
42 url: url,
Jonathan Hart345c0192016-04-20 09:00:58 -070043 validatorUrl : null,
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070044 dom_id: "swagger-ui-container",
45 supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
46 onComplete: function(swaggerApi, swaggerUi){
47 if(typeof initOAuth == "function") {
48 initOAuth({
49 clientId: "your-client-id",
50 realm: "your-realms",
51 appName: "your-app-name"
52 });
53 }
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070054 },
55 onFailure: function(data) {
56 log("Unable to Load SwaggerUI");
57 },
58 docExpansion: "none",
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070059 showRequestHeaders: false
60 });
61
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070062 window.swaggerUi.load();
63
64 function log() {
65 if ('console' in window) {
66 console.log.apply(console, arguments);
67 }
68 }
69 });
70
71 function selectApi() {
72 $('#input_baseUrl').val('/onos/v1/docs/apis' + $('select').val() + '/swagger.json');
73 $('#explore').click();
74 }
75 </script>
76</head>
77
78<body class="swagger-section">
79<div id='header'>
80 <div class="swagger-ui-wrap">
Jian Li8afbbee2016-07-27 19:16:51 +090081 <a id="logo" href="#"><img class="logo__img" alt="swagger" height="30" width="36" src="images/onos-logo.png" /></a>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070082 <form id='api_selector'>
83 <div class='input' id='selector'>
84 <select onchange="selectApi()">
85 <!-- {API-START} -->
86 <option value="v1">ONOS v1 Core</option>
87 <option value="foo">ONOS Foo app</option>
88 <option value="bar">ONOS Bar app</option>
89 <!-- {API-END} -->
90 </select>
91 </div>
92 <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
Jian Li8afbbee2016-07-27 19:16:51 +090093 <div id='auth_container'></div>
94 <div class='input'><a id="explore" class="header__btn" href="#">Explore</a></div>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070095 </form>
96 </div>
97</div>
98
99<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
100<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
Jian Li7f6d0e9e2016-09-27 02:04:49 +0900101<div id="footer" class="swagger-ui-wrap"><a href="http://swagger.io/swagger-ui/">Swagger UI</a> (v2.2.5) adaptation</div>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -0700102</body>
103</html>