Skip to content

Commit

Permalink
Merge pull request #10 from TheAirBlow/swagger-ui-updates
Browse files Browse the repository at this point in the history
Update SwaggerUI to v4.16.1
  • Loading branch information
TheAirBlow committed Mar 1, 2023
2 parents 57bd6da + c95f159 commit 9109127
Show file tree
Hide file tree
Showing 17 changed files with 43 additions and 39 deletions.
16 changes: 16 additions & 0 deletions dist/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
html {
box-sizing: border-box;
overflow: -moz-scrollbars-vertical;
overflow-y: scroll;
}

*,
*:before,
*:after {
box-sizing: inherit;
}

body {
margin: 0;
background: #fafafa;
}
6 changes: 3 additions & 3 deletions dist/oauth2-redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
var isValid, qp, arr;

if (/code|token|error/.test(window.location.hash)) {
qp = window.location.hash.substring(1);
qp = window.location.hash.substring(1).replace('?', '&');
} else {
qp = location.search.substring(1);
}
Expand All @@ -38,7 +38,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "warning",
message: "Authorization may be unsafe, passed state was changed in server Passed state wasn't returned from auth server"
message: "Authorization may be unsafe, passed state was changed in server. The passed state wasn't returned from auth server."
});
}

Expand All @@ -58,7 +58,7 @@
authId: oauth2.auth.name,
source: "auth",
level: "error",
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server"
message: oauthErrorMsg || "[Authorization failed]: no accessCode received from the server."
});
}
} else {
Expand Down
24 changes: 8 additions & 16 deletions dist/swagger-initializer.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
window.onload = function() {
//<editor-fold desc="Changeable Configuration Block">

// the following lines will be replaced by docker/configurator, when it runs in a docker-container
window.ui = SwaggerUIBundle({
urls: [
{"url": "https://raw.githubusercontent.com/TheAirBlow/mojang-api/master/docs/mojang/api.yaml", "name": "api.mojang.com"},
{"url": "https://raw.githubusercontent.com/TheAirBlow/mojang-api/master/docs/mojang/sessionserver.yaml", "name": "sessionserver.mojang.com"},
{"url": "https://raw.githubusercontent.com/TheAirBlow/mojang-api/master/docs/mojang/authserver.yaml", "name": "authserver.mojang.com"},
{"url": "https://raw.githubusercontent.com/TheAirBlow/mojang-api/master/docs/minecraft/api.yaml", "name": "api.minecraftservices.com"}
],
queryConfigEnabled: true,
url: "https://petstore.swagger.io/v2/swagger.json",
dom_id: '#swagger-ui',
deepLinking: true,
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIStandalonePreset
],
plugins: [
SwaggerUIBundle.plugins.DownloadUrl,
SwaggerUIBundle.plugins.Topbar
SwaggerUIBundle.plugins.DownloadUrl
],
layout: "StandaloneLayout",
requestInterceptor: function(req) {
if (req.url.startsWith("https://raw.githubusercontent.com/TheAirBlow/mojang-api/master/docs/"))
return req;
req.url = `https://mojangcors.herokuapp.com/${req.url}`
return req;
}
layout: "StandaloneLayout"
});

//</editor-fold>
};
2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-es-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-standalone-preset.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/swagger-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/swagger-ui.js.map

Large diffs are not rendered by default.

9 changes: 3 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Mojang API documentation</title>
<title>Swagger UI</title>
<link rel="stylesheet" type="text/css" href="dist/swagger-ui.css" />
<link rel="stylesheet" type="text/css" href="index.css" />
<link rel="icon" type="image/x-icon" href="https://minecraft.net//etc.clientlibs/minecraft/clientlibs/main/resources/favicon.ico">
<link rel="icon" type="image/png" sizes="192x192" href="https://minecraft.net//etc.clientlibs/minecraft/clientlibs/main/resources/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="96x96" href="https://minecraft.net//etc.clientlibs/minecraft/clientlibs/main/resources/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="32x32" href="https://minecraft.net//etc.clientlibs/minecraft/clientlibs/main/resources/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="https://minecraft.net//etc.clientlibs/minecraft/clientlibs/main/resources/favicon-16x16.png">
<link rel="icon" type="image/png" href="dist/favicon-32x32.png" sizes="32x32" />
<link rel="icon" type="image/png" href="dist/favicon-16x16.png" sizes="16x16" />
</head>

<body>
Expand Down
2 changes: 1 addition & 1 deletion swagger-ui.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v4.10.3
v4.16.1

0 comments on commit 9109127

Please sign in to comment.