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", |
Jian Li | 1c94b9d | 2017-02-08 15:47:21 +0900 | [diff] [blame] | 59 | showRequestHeaders: false, |
| 60 | showOperationIds: false |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 61 | }); |
| 62 | |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 63 | 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 Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 82 | <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] | 83 | <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 Li | 8afbbee | 2016-07-27 19:16:51 +0900 | [diff] [blame] | 94 | <div id='auth_container'></div> |
| 95 | <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] | 96 | </form> |
| 97 | </div> |
| 98 | </div> |
| 99 | |
| 100 | <div id="message-bar" class="swagger-ui-wrap"> </div> |
| 101 | <div id="swagger-ui-container" class="swagger-ui-wrap"></div> |
Jian Li | 1c94b9d | 2017-02-08 15:47:21 +0900 | [diff] [blame] | 102 | <div id="footer" class="swagger-ui-wrap"><a href="http://swagger.io/swagger-ui/">Swagger UI</a> (v2.2.10) adaptation</div> |
Thomas Vachuska | 0fa2aa1 | 2015-08-18 12:53:04 -0700 | [diff] [blame] | 103 | </body> |
| 104 | </html> |