2013-11-29 15:21:42 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>StrongLoop API Explorer</title>
|
|
|
|
<link href='//fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet' type='text/css'/>
|
|
|
|
<link href='css/hightlight.default.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
|
|
<link href='css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
|
|
|
|
<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">
|
2013-11-29 15:17:59 +00:00
|
|
|
$(function() {
|
|
|
|
$.getJSON('config.json', function(config) {
|
|
|
|
console.log(config);
|
|
|
|
loadSwaggerUi(config);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
function loadSwaggerUi(config) {
|
|
|
|
window.swaggerUi = new SwaggerUi({
|
|
|
|
discoveryUrl: config.discoveryUrl || "/swagger/resources",
|
|
|
|
apiKey: "",
|
|
|
|
dom_id: "swagger-ui-container",
|
2013-11-29 15:21:42 +00:00
|
|
|
supportHeaderParams: true,
|
|
|
|
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
2013-11-29 15:17:59 +00:00
|
|
|
onComplete: function(swaggerApi, swaggerUi) {
|
|
|
|
if (console) {
|
2013-11-29 15:21:42 +00:00
|
|
|
console.log("Loaded SwaggerUI")
|
|
|
|
console.log(swaggerApi);
|
|
|
|
console.log(swaggerUi);
|
|
|
|
}
|
2013-11-29 15:17:59 +00:00
|
|
|
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
|
2013-11-29 15:21:42 +00:00
|
|
|
},
|
|
|
|
onFailure: function(data) {
|
2013-11-29 15:17:59 +00:00
|
|
|
if (console) {
|
2013-11-29 15:21:42 +00:00
|
|
|
console.log("Unable to Load SwaggerUI");
|
|
|
|
console.log(data);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
docExpansion: "none"
|
|
|
|
});
|
|
|
|
|
|
|
|
window.swaggerUi.load();
|
2013-11-29 15:17:59 +00:00
|
|
|
}
|
2013-11-29 15:21:42 +00:00
|
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<div id='header'>
|
|
|
|
<div class="swagger-ui-wrap">
|
|
|
|
<a id="logo">StrongLoop API Explorer</a>
|
|
|
|
|
|
|
|
<form id='api_selector'>
|
2013-11-29 15:17:59 +00:00
|
|
|
<div class='input'>
|
|
|
|
<input placeholder="http://example.com/api"
|
|
|
|
id="input_baseUrl" name="baseUrl"
|
|
|
|
type="text"/>
|
|
|
|
</div>
|
2013-11-29 15:21:42 +00:00
|
|
|
<div class='input'><a id="explore" href="#">Explore</a></div>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="message-bar" class="swagger-ui-wrap">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="swagger-ui-container" class="swagger-ui-wrap">
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</body>
|
|
|
|
|
|
|
|
</html>
|