blob: 749717f428f0e4ec39ca128b12ed67305d8f11f0 [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",
Jian Li1c94b9d2017-02-08 15:47:21 +090059 showRequestHeaders: false,
60 showOperationIds: false
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070061 });
62
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070063 window.swaggerUi.load();
64
65 function log() {
66 if ('console' in window) {
67 console.log.apply(console, arguments);
68 }
69 }
70 });
71
72 function selectApi() {
73 $('#input_baseUrl').val('/onos/v1/docs/apis' + $('select').val() + '/swagger.json');
74 $('#explore').click();
75 }
76 </script>
77</head>
78
79<body class="swagger-section">
80<div id='header'>
81 <div class="swagger-ui-wrap">
Jian Li8afbbee2016-07-27 19:16:51 +090082 <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 -070083 <form id='api_selector'>
84 <div class='input' id='selector'>
85 <select onchange="selectApi()">
86 <!-- {API-START} -->
87 <option value="v1">ONOS v1 Core</option>
88 <option value="foo">ONOS Foo app</option>
89 <option value="bar">ONOS Bar app</option>
90 <!-- {API-END} -->
91 </select>
92 </div>
93 <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
Jian Li8afbbee2016-07-27 19:16:51 +090094 <div id='auth_container'></div>
95 <div class='input'><a id="explore" class="header__btn" href="#">Explore</a></div>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -070096 </form>
97 </div>
98</div>
99
100<div id="message-bar" class="swagger-ui-wrap">&nbsp;</div>
101<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
Jian Li1c94b9d2017-02-08 15:47:21 +0900102<div id="footer" class="swagger-ui-wrap"><a href="http://swagger.io/swagger-ui/">Swagger UI</a> (v2.2.10) adaptation</div>
Thomas Vachuska0fa2aa12015-08-18 12:53:04 -0700103</body>
104</html>