mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
APPS-765 : GS-API-Explorer not working with api-explorer 7.0.0-A3
This commit is contained in:
@@ -394,14 +394,14 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.reflections</groupId>
|
<groupId>org.reflections</groupId>
|
||||||
<artifactId>reflections</artifactId>
|
<artifactId>reflections</artifactId>
|
||||||
<version>0.9.10</version>
|
<version>0.9.12</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- swagger parser -->
|
<!-- swagger parser -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>io.swagger</groupId>
|
<groupId>io.swagger</groupId>
|
||||||
<artifactId>swagger-parser</artifactId>
|
<artifactId>swagger-parser</artifactId>
|
||||||
<version>1.0.35</version>
|
<version>1.0.52</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-validator -->
|
<!-- https://mvnrepository.com/artifact/com.github.fge/json-schema-validator -->
|
||||||
|
@@ -1,155 +1,81 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta http-equiv="cache-control" content="max-age=0"/>
|
|
||||||
<meta http-equiv="cache-control" content="no-cache"/>
|
|
||||||
<meta http-equiv="expires" content="0"/>
|
|
||||||
<meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT"/>
|
|
||||||
<meta http-equiv="pragma" content="no-cache"/>
|
|
||||||
<title>Alfresco Governance Services REST API Explorer</title>
|
<title>Alfresco Governance Services REST API Explorer</title>
|
||||||
<link rel="shortcut icon"
|
<link rel="stylesheet" type="text/css" href="./swagger-ui.css">
|
||||||
href="https://cdn-www.alfresco.com/sites/www.alfresco.com/themes/alfrescodotcom/favicon.ico"/>
|
<link href='./css/alfresco.css' media='screen' rel='stylesheet' type='text/css'/>
|
||||||
<link href='css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
||||||
<link href='css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
||||||
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
||||||
<link href='css/reset.css' media='print' rel='stylesheet' type='text/css'/>
|
|
||||||
<link href='css/print.css' media='print' rel='stylesheet' type='text/css'/>
|
|
||||||
<link href='css/alfresco.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
||||||
<!-- Google Tag Manager -->
|
|
||||||
<script>
|
|
||||||
(function (w, d, s, l, i) {
|
|
||||||
w[l] = w[l] || [];
|
|
||||||
w[l].push({
|
|
||||||
'gtm.start': new Date().getTime(),
|
|
||||||
event: 'gtm.js'
|
|
||||||
});
|
|
||||||
var f = d.getElementsByTagName(s)[0],
|
|
||||||
j = d.createElement(s), dl = l != 'dataLayer' ? '&l=' + l : '';
|
|
||||||
j.async = true;
|
|
||||||
j.src =
|
|
||||||
'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
|
|
||||||
f.parentNode.insertBefore(j, f);
|
|
||||||
})(window, document, 'script', 'dataLayer', 'GTM-W4HV22');
|
|
||||||
</script>
|
|
||||||
<!-- End Google Tag Manager -->
|
|
||||||
<script src='lib/jquery-1.8.0.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/jquery.slideto.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/jquery.wiggle.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/handlebars-4.0.5.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/object-assign-pollyfill.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/es5-shim.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/js-yaml.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/sanitize-html.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/lodash.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
|
||||||
<script src='swagger-ui.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/jsoneditor.min.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/marked.js' type='text/javascript'></script>
|
|
||||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
|
||||||
|
|
||||||
<!-- Some basic translations -->
|
<link rel="icon" type="image/png" href="./favicon-32x32.png" sizes="32x32"/>
|
||||||
<!-- <script src='lang/translator.js' type='text/javascript'></script> -->
|
<link rel="icon" type="image/png" href="./favicon-16x16.png" sizes="16x16"/>
|
||||||
<!-- <script src='lang/ru.js' type='text/javascript'></script> -->
|
<style>
|
||||||
<!-- <script src='lang/en.js' type='text/javascript'></script> -->
|
html
|
||||||
|
{
|
||||||
|
box-sizing: border-box;
|
||||||
|
overflow: -moz-scrollbars-vertical;
|
||||||
|
overflow-y: scroll;
|
||||||
|
}
|
||||||
|
*, *:before, *:after
|
||||||
|
{
|
||||||
|
box-sizing: inherit;
|
||||||
|
}
|
||||||
|
body
|
||||||
|
{
|
||||||
|
margin:0;
|
||||||
|
background: #fafafa;
|
||||||
|
padding:0;
|
||||||
|
}
|
||||||
|
|
||||||
<script type="text/javascript">
|
.swagger-ui .topbar {
|
||||||
$(function () {
|
background-color: #e6e6ec;
|
||||||
window.swaggerUi = new SwaggerUi({
|
}
|
||||||
url: "definitions/gs-core-api.yaml",
|
.swagger-ui .topbar .download-url-wrapper .select-label {
|
||||||
dom_id: "swagger-ui-container",
|
color: #333;
|
||||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
}
|
||||||
onComplete: function (swaggerApi, swaggerUi) {
|
.topbar-wrapper img[alt="Swagger UI"] {
|
||||||
|
visibility: collapse;
|
||||||
|
}
|
||||||
|
.topbar-wrapper .link:before {
|
||||||
|
content:url('images/logo.svg');
|
||||||
|
}
|
||||||
|
|
||||||
$('pre code').each(function (i, e) {
|
/* https://stackoverflow.com/a/65782841/1654265 */
|
||||||
hljs.highlightBlock(e)
|
.errors-wrapper {
|
||||||
});
|
display: none !important;
|
||||||
|
}
|
||||||
addAuthorization();
|
|
||||||
},
|
|
||||||
onFailure: function (data) {
|
|
||||||
log("Unable to Load SwaggerUI");
|
|
||||||
},
|
|
||||||
docExpansion: "none",
|
|
||||||
jsonEditor: false,
|
|
||||||
apisSorter: "alpha",
|
|
||||||
operationsSorter: "alpha",
|
|
||||||
defaultModelRendering: 'schema',
|
|
||||||
showRequestHeaders: false,
|
|
||||||
validatorUrl: null
|
|
||||||
});
|
|
||||||
|
|
||||||
function addAuthorization() {
|
|
||||||
|
|
||||||
var cacheA = new SwaggerClient.ApiKeyAuthorization("If-Modified-Since", "Mon, 26 Jul 1997 05:00:00 GMT", "header"),
|
|
||||||
cacheB = new SwaggerClient.ApiKeyAuthorization("Cache-Control", "no-cache", "header"),
|
|
||||||
cacheC = new SwaggerClient.ApiKeyAuthorization("Pragma", "no-cache", "header"),
|
|
||||||
username = $('#input_username').val(),
|
|
||||||
password = $('#input_password').val();
|
|
||||||
|
|
||||||
if (username.trim() != "" && password.trim() != "")
|
|
||||||
{
|
|
||||||
var basicAuth = new SwaggerClient.PasswordAuthorization(username, password);
|
|
||||||
window.swaggerUi.api.clientAuthorizations.remove("basicAuth");
|
|
||||||
window.swaggerUi.api.clientAuthorizations.add("basicAuth", basicAuth);
|
|
||||||
log("authorization added: username = " + username + ", auth = " + basicAuth);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.swaggerUi.api.clientAuthorizations.add("cacheA", cacheA);
|
|
||||||
window.swaggerUi.api.clientAuthorizations.add("cacheB", cacheB);
|
|
||||||
window.swaggerUi.api.clientAuthorizations.add("cacheC", cacheC);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$('#input_username').change(addAuthorization);
|
</style>
|
||||||
$('#input_password').change(addAuthorization);
|
|
||||||
|
|
||||||
window.swaggerUi.load();
|
|
||||||
|
|
||||||
$('#select_baseUrl').change(function () {
|
|
||||||
window.swaggerUi.headerView.trigger('update-swagger-ui', {
|
|
||||||
url: $('#select_baseUrl').val()
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
function log() {
|
|
||||||
if ('console' in window)
|
|
||||||
{
|
|
||||||
console.log.apply(console, arguments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="swagger-section">
|
<body>
|
||||||
<!-- Google Tag Manager (noscript) -->
|
<div id="swagger-ui"></div>
|
||||||
<noscript>
|
|
||||||
<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-W4HV22" height="0" width="0"
|
|
||||||
style="display:none;visibility:hidden"></iframe>
|
|
||||||
</noscript>
|
|
||||||
<!-- End Google Tag Manager (noscript) -->
|
|
||||||
<div id='header'>
|
|
||||||
<div class="swagger-ui-wrap">
|
|
||||||
<a id="alflogo" href="#"><img src="images/logo.png" height="44px" width="160px"/></a>
|
|
||||||
<form id="api_selector">
|
|
||||||
<div class="input" id="select-wrapper">
|
|
||||||
<select id="select_baseUrl" name="select_baseUrl">
|
|
||||||
<option value="definitions/gs-core-api.yaml">GS Core API</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="input"><input alt="Username" type="text" name="username" id="input_username" placeholder="username"
|
|
||||||
size="10" value="admin"></div>
|
|
||||||
<div class="input"><input alt="Password" type="password" name="password" id="input_password"
|
|
||||||
placeholder="password" size="10" value="admin"></div>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="message-bar" class="swagger-ui-wrap" data-sw-translate> </div>
|
<script src="./swagger-ui-bundle.js" charset="UTF-8"></script>
|
||||||
<div id="swagger-ui-container" class="swagger-ui-wrap"></div>
|
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"></script>
|
||||||
|
<script>
|
||||||
|
window.onload = function() {
|
||||||
|
|
||||||
|
const ui = SwaggerUIBundle({
|
||||||
|
urls: [
|
||||||
|
{url: "definitions/gs-core-api.yaml", name: "GS Core API"}
|
||||||
|
],
|
||||||
|
dom_id: '#swagger-ui',
|
||||||
|
deepLinking: true,
|
||||||
|
displayRequestDuration: true,
|
||||||
|
presets: [
|
||||||
|
SwaggerUIBundle.presets.apis,
|
||||||
|
SwaggerUIStandalonePreset
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
SwaggerUIBundle.plugins.DownloadUrl
|
||||||
|
],
|
||||||
|
layout: "StandaloneLayout"
|
||||||
|
})
|
||||||
|
|
||||||
|
window.ui = ui
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
Reference in New Issue
Block a user