Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 1 | <!-- 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 Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 13 | <script src='lib/object-assign-pollyfill.js' type='text/javascript'></script> |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 14 | <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 Li | 7f6d0e9e | 2016-09-27 02:04:49 +0900 | [diff] [blame] | 18 | <script src='lib/handlebars-4.0.5.js' type='text/javascript'></script> |
Jian Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 19 | <script src='lib/lodash.min.js' type='text/javascript'></script> |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 20 | <script src='lib/backbone-min.js' type='text/javascript'></script> |
| 21 | <script src='swagger-ui.js' type='text/javascript'></script> |
Jian Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 22 | <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 Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 25 | <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 Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 36 | |
| 37 | hljs.configure({ |
| 38 | highlightSizeThreshold: 5000 |
| 39 | }); |
| 40 | |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 41 | window.swaggerUi = new SwaggerUi({ |
| 42 | url: url, |
Jonathan Hart | 345c019 | 2016-04-20 09:00:58 -0700 | [diff] [blame] | 43 | validatorUrl : null, |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 44 | 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 Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 54 | }, |
| 55 | onFailure: function(data) { |
| 56 | log("Unable to Load SwaggerUI"); |
| 57 | }, |
| 58 | docExpansion: "none", |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 59 | showRequestHeaders: false |
| 60 | }); |
| 61 | |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 62 | 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 Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 81 | <a id="logo" href="#"><img class="logo__img" alt="swagger" height="30" width="36" src="images/onos-logo.png" /></a> |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 82 | <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 Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 93 | <div id='auth_container'></div> |
| 94 | <div class='input'><a id="explore" class="header__btn" href="#">Explore</a></div> |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 95 | </form> |
| 96 | </div> |
| 97 | </div> |
| 98 | |
| 99 | <div id="message-bar" class="swagger-ui-wrap"> </div> |
| 100 | <div id="swagger-ui-container" class="swagger-ui-wrap"></div> |
Jian Li | 7f6d0e9e | 2016-09-27 02:04:49 +0900 | [diff] [blame] | 101 | <div id="footer" class="swagger-ui-wrap"><a href="http://swagger.io/swagger-ui/">Swagger UI</a> (v2.2.5) adaptation</div> |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 102 | </body> |
| 103 | </html> |