mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2025-01-05 17:43:50 +01:00
ae604b1c70
Implement REST Console support.
79 lines
3.0 KiB
HTML
Executable File
79 lines
3.0 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>WiseMapping REST API</title>
|
|
<link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
|
|
<link href='css/highlight.default.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
<script type="text/javascript" src="lib/shred.bundle.js"/></script>
|
|
<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-1.0.0.js' type='text/javascript'></script>
|
|
<script src='lib/underscore-min.js' type='text/javascript'></script>
|
|
<script src='lib/backbone-min.js' type='text/javascript'></script>
|
|
<script src='lib/swagger.js' type='text/javascript'></script>
|
|
<script src='swagger-ui.js' type='text/javascript'></script>
|
|
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
window.swaggerUi = new SwaggerUi({
|
|
url: "/service/api-docs",
|
|
dom_id: "swagger-ui-container",
|
|
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
|
onComplete: function(swaggerApi, swaggerUi){
|
|
if(console) {
|
|
console.log("Loaded SwaggerUI")
|
|
}
|
|
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
|
},
|
|
onFailure: function(data) {
|
|
if(console) {
|
|
console.log("Unable to Load SwaggerUI");
|
|
console.log(data);
|
|
}
|
|
},
|
|
docExpansion: "none"
|
|
});
|
|
|
|
$('#input_apiKey').change(function() {
|
|
var key = $('#input_apiKey')[0].value;
|
|
console.log("key: " + key);
|
|
if(key && key.trim() != "") {
|
|
console.log("added key " + key);
|
|
window.authorizations.add("key", new ApiKeyAuthorization("api_key", key, "query"));
|
|
}
|
|
})
|
|
window.swaggerUi.load();
|
|
});
|
|
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<div id='header'>
|
|
<div class="swagger-ui-wrap">
|
|
<img src="../../images/logo-small.png">
|
|
<a id="logo" href="http://www.wisemapping.org/">WiseMapping REST API Documentation</a>
|
|
<input placeholder="../../service" id="input_baseUrl" name="baseUrl" type="hidden"/>
|
|
</div>
|
|
</div>
|
|
|
|
<div id="message-bar" class="swagger-ui-wrap">
|
|
</div>
|
|
|
|
<div class="swagger-ui-wrap">
|
|
<h1>Welcome REST API Console</h1>
|
|
<p>Use this console to learn how to use WiseMapping REST APIs. </p>
|
|
<p><b>Important:</b> Don't forget to configure your server host url in /WEB-INF/app.properties. By default it's configure to http://localhost:8080/wisemapping/</p>
|
|
<p></p>
|
|
</div>
|
|
|
|
<div id="swagger-ui-container" class="swagger-ui-wrap">
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|