瀏覽代碼

Merge pull request #4293 from ntimo/task/updated-swagger-to-3.52.5

Updated Swagger UI to v3.52.5
Timo 3 年之前
父節點
當前提交
1c36f828e0

+ 6 - 6
data/web/api/index.html

@@ -4,7 +4,7 @@
   <head>
     <meta charset="UTF-8">
     <title>Swagger UI</title>
-    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
+    <link rel="stylesheet" type="text/css" href="./swagger-ui.css" />
     <link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32" />
     <link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16" />
     <style>
@@ -33,8 +33,8 @@
   <body>
     <div id="swagger-ui"></div>
 
-    <script src="./swagger-ui-bundle.js"> </script>
-    <script src="./swagger-ui-standalone-preset.js"> </script>
+    <script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
+    <script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
     <script>
     window.onload = function() {
       // Begin Swagger UI call region
@@ -50,11 +50,11 @@
           SwaggerUIBundle.plugins.DownloadUrl
         ],
         layout: "StandaloneLayout"
-      })
+      });
       // End Swagger UI call region
 
-      window.ui = ui
-    }
+      window.ui = ui;
+    };
   </script>
   </body>
 </html>

+ 19 - 12
data/web/api/oauth2-redirect.html

@@ -1,9 +1,9 @@
 <!doctype html>
 <html lang="en-US">
-<title>Swagger UI: OAuth2 Redirect</title>
-<body onload="run()">
-</body>
-</html>
+<head>
+    <title>Swagger UI: OAuth2 Redirect</title>
+</head>
+<body>
 <script>
     'use strict';
     function run () {
@@ -18,19 +18,20 @@
             qp = location.search.substring(1);
         }
 
-        arr = qp.split("&")
-        arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';})
+        arr = qp.split("&");
+        arr.forEach(function (v,i,_arr) { _arr[i] = '"' + v.replace('=', '":"') + '"';});
         qp = qp ? JSON.parse('{' + arr.join() + '}',
                 function (key, value) {
-                    return key === "" ? value : decodeURIComponent(value)
+                    return key === "" ? value : decodeURIComponent(value);
                 }
-        ) : {}
+        ) : {};
 
-        isValid = qp.state === sentState
+        isValid = qp.state === sentState;
 
         if ((
-          oauth2.auth.schema.get("flow") === "accessCode"||
-          oauth2.auth.schema.get("flow") === "authorizationCode"
+          oauth2.auth.schema.get("flow") === "accessCode" ||
+          oauth2.auth.schema.get("flow") === "authorizationCode" ||
+          oauth2.auth.schema.get("flow") === "authorization_code"
         ) && !oauth2.auth.code) {
             if (!isValid) {
                 oauth2.errCb({
@@ -46,7 +47,7 @@
                 oauth2.auth.code = qp.code;
                 oauth2.callback({auth: oauth2.auth, redirectUrl: redirectUrl});
             } else {
-                let oauthErrorMsg
+                let oauthErrorMsg;
                 if (qp.error) {
                     oauthErrorMsg = "["+qp.error+"]: " +
                         (qp.error_description ? qp.error_description+ ". " : "no accessCode received from the server. ") +
@@ -65,4 +66,10 @@
         }
         window.close();
     }
+
+    window.addEventListener('DOMContentLoaded', function () {
+      run();
+    });
 </script>
+</body>
+</html>

File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui-bundle.js


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui-bundle.js.map


File diff suppressed because it is too large
+ 1 - 0
data/web/api/swagger-ui-es-bundle-core.js


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui-es-bundle-core.js.map


File diff suppressed because it is too large
+ 1 - 0
data/web/api/swagger-ui-es-bundle.js


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui-es-bundle.js.map


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui-standalone-preset.js


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui-standalone-preset.js.map


File diff suppressed because it is too large
+ 0 - 1
data/web/api/swagger-ui.css


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui.css.map


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui.js


File diff suppressed because it is too large
+ 0 - 0
data/web/api/swagger-ui.js.map


Some files were not shown because too many files changed in this diff