Fix broken swagger
[sdc.git] / openecomp-be / tools / swagger-ui / index.html
1 <!-- HTML for static distribution bundle build -->
2 <!DOCTYPE html>
3 <html lang="en">
4   <head>
5     <meta charset="UTF-8">
6     <title>API Docs</title>
7     <link rel="stylesheet" type="text/css" href="./css/swagger-ui.css" />
8     <link rel="icon" type="image/png" href="./images/favicon-32x32.png" sizes="32x32" />
9     <link rel="icon" type="image/png" href="./images/favicon-16x16.png" sizes="16x16" />
10     <style>
11       html
12       {
13         box-sizing: border-box;
14         overflow: -moz-scrollbars-vertical;
15         overflow-y: scroll;
16       }
17
18       *,
19       *:before,
20       *:after
21       {
22         box-sizing: inherit;
23       }
24
25       body
26       {
27         margin:0;
28         background: #fafafa;
29       }
30     </style>
31   </head>
32
33   <body>
34     <div id="swagger-ui"></div>
35
36     <script src="./lib/swagger-ui-bundle.js" charset="UTF-8"> </script>
37     <script src="./lib/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
38     <script>
39     window.onload = function() {
40       let url = window.location.protocol + "//" + window.location.host;
41       if (window.location.pathname.indexOf('/api-docs') > 0) {
42         url += window.location.pathname.substring(0, window.location.pathname.indexOf('/api-docs'))
43       }
44       url += "/api-docs/swagger-sdce-1.json";
45
46       // Begin Swagger UI call region
47       const ui = SwaggerUIBundle({
48         url: url,
49         dom_id: '#swagger-ui',
50         deepLinking: true,
51         presets: [
52           SwaggerUIBundle.presets.apis,
53           SwaggerUIStandalonePreset
54         ],
55         plugins: [
56           SwaggerUIBundle.plugins.DownloadUrl
57         ],
58         layout: "StandaloneLayout"
59       });
60       // End Swagger UI call region
61
62       window.ui = ui;
63     };
64   </script>
65   </body>
66 </html>