blob: fd2e909201bd8b578f639dbcece7637c70838d22 [file] [log] [blame]
Zsolt Haraszti7baf38a2016-10-01 15:15:18 -07001<!DOCTYPE html>
2<html>
3<head>
4 <meta charset="UTF-8">
5 <title>Swagger UI</title>
6 <link rel="icon" type="image/png" href="images/favicon-32x32.png" sizes="32x32" />
7 <link rel="icon" type="image/png" href="images/favicon-16x16.png" sizes="16x16" />
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'/>
13
14 <script src='lib/object-assign-pollyfill.js' type='text/javascript'></script>
15 <script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
16 <script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
17 <script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
18 <script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
19 <script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
20 <script src='lib/lodash.min.js' type='text/javascript'></script>
21 <script src='lib/backbone-min.js' type='text/javascript'></script>
22 <script src='swagger-ui.js' type='text/javascript'></script>
23 <script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
24 <script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
25 <script src='lib/jsoneditor.min.js' type='text/javascript'></script>
26 <script src='lib/marked.js' type='text/javascript'></script>
27 <script src='lib/swagger-oauth.js' type='text/javascript'></script>
28
29 <!-- Some basic translations -->
30 <!-- <script src='lang/translator.js' type='text/javascript'></script> -->
31 <!-- <script src='lang/ru.js' type='text/javascript'></script> -->
32 <!-- <script src='lang/en.js' type='text/javascript'></script> -->
33
34 <script type="text/javascript">
35 $(function () {
36 var url = window.location.search.match(/url=([^&]+)/);
37 if (url && url.length > 1) {
38 url = decodeURIComponent(url[1]);
39 } else {
Zsolt Haraszti034db372016-10-03 22:26:41 -070040 url = "/v1/swagger.json";
Zsolt Haraszti7baf38a2016-10-01 15:15:18 -070041 }
42
43 hljs.configure({
44 highlightSizeThreshold: 5000
45 });
46
47 // Pre load translate...
48 if(window.SwaggerTranslator) {
49 window.SwaggerTranslator.translate();
50 }
51 window.swaggerUi = new SwaggerUi({
52 url: url,
53 dom_id: "swagger-ui-container",
54 supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
55 onComplete: function(swaggerApi, swaggerUi){
56 if(typeof initOAuth == "function") {
57 initOAuth({
58 clientId: "your-client-id",
59 clientSecret: "your-client-secret-if-required",
60 realm: "your-realms",
61 appName: "your-app-name",
62 scopeSeparator: " ",
63 additionalQueryStringParams: {}
64 });
65 }
66
67 if(window.SwaggerTranslator) {
68 window.SwaggerTranslator.translate();
69 }
70 },
71 onFailure: function(data) {
72 log("Unable to Load SwaggerUI");
73 },
74 docExpansion: "none",
75 jsonEditor: false,
76 defaultModelRendering: 'schema',
77 showRequestHeaders: false
78 });
79
80 window.swaggerUi.load();
81
82 function log() {
83 if ('console' in window) {
84 console.log.apply(console, arguments);
85 }
86 }
87 });
88 </script>
89</head>
90
91<body class="swagger-section">
92<div id='header'>
93 <div class="swagger-ui-wrap">
94 <a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a>
95 <form id='api_selector'>
96 <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
97 <div id='auth_container'></div>
98 <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
99 </form>
100 </div>
101</div>
102
103<div id="message-bar" class="swagger-ui-wrap" data-sw-translate>&nbsp;</div>
104<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
105</body>
106</html>