formatting
This commit is contained in:
71
dist/index.html
vendored
71
dist/index.html
vendored
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<!-- enabling this will enable oauth2 implicit scope support -->
|
<!-- enabling this will enable oauth2 implicit scope support -->
|
||||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
|
<script src='spec.js' type='text/javascript'></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var url = window.location.search.match(/url=([^&]+)/);
|
var url = window.location.search.match(/url=([^&]+)/);
|
||||||
@@ -32,53 +32,52 @@
|
|||||||
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
||||||
}
|
}
|
||||||
window.swaggerUi = new SwaggerUi({
|
window.swaggerUi = new SwaggerUi({
|
||||||
url: url,
|
url: url,
|
||||||
dom_id: "swagger-ui-container",
|
dom_id: "swagger-ui-container",
|
||||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
||||||
onComplete: function(swaggerApi, swaggerUi){
|
onComplete: function(swaggerApi, swaggerUi){
|
||||||
log("Loaded SwaggerUI");
|
log("Loaded SwaggerUI");
|
||||||
|
if(typeof initOAuth == "function") {
|
||||||
if(typeof initOAuth == "function") {
|
/*
|
||||||
/*
|
initOAuth({
|
||||||
initOAuth({
|
clientId: "your-client-id",
|
||||||
clientId: "your-client-id",
|
realm: "your-realms",
|
||||||
realm: "your-realms",
|
appName: "your-app-name"
|
||||||
appName: "your-app-name"
|
});
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
$('pre code').each(function(i, e) {
|
||||||
|
hljs.highlightBlock(e)
|
||||||
});
|
});
|
||||||
*/
|
},
|
||||||
}
|
onFailure: function(data) {
|
||||||
$('pre code').each(function(i, e) {
|
log("Unable to Load SwaggerUI");
|
||||||
hljs.highlightBlock(e)
|
},
|
||||||
});
|
docExpansion: "none",
|
||||||
},
|
sorter : "alpha"
|
||||||
onFailure: function(data) {
|
});
|
||||||
log("Unable to Load SwaggerUI");
|
|
||||||
},
|
|
||||||
docExpansion: "none",
|
|
||||||
sorter : "alpha"
|
|
||||||
});
|
|
||||||
|
|
||||||
function addApiKeyAuthorization() {
|
function addApiKeyAuthorization() {
|
||||||
var key = $('#input_apiKey')[0].value;
|
var key = $('#input_apiKey')[0].value;
|
||||||
log("key: " + key);
|
log("key: " + key);
|
||||||
if(key && key.trim() != "") {
|
if(key && key.trim() != "") {
|
||||||
log("added key " + key);
|
log("added key " + key);
|
||||||
window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
|
window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#input_apiKey').change(function() {
|
$('#input_apiKey').change(function() {
|
||||||
addApiKeyAuthorization();
|
addApiKeyAuthorization();
|
||||||
});
|
});
|
||||||
|
|
||||||
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
|
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
|
||||||
/*
|
/*
|
||||||
var apiKey = "myApiKeyXXXX123456789";
|
var apiKey = "myApiKeyXXXX123456789";
|
||||||
$('#input_apiKey').val(apiKey);
|
$('#input_apiKey').val(apiKey);
|
||||||
addApiKeyAuthorization();
|
addApiKeyAuthorization();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.load();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
|
|
||||||
<!-- enabling this will enable oauth2 implicit scope support -->
|
<!-- enabling this will enable oauth2 implicit scope support -->
|
||||||
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(function () {
|
$(function () {
|
||||||
var url = window.location.search.match(/url=([^&]+)/);
|
var url = window.location.search.match(/url=([^&]+)/);
|
||||||
@@ -32,53 +31,52 @@
|
|||||||
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
url = "http://petstore.swagger.wordnik.com/v2/swagger.json";
|
||||||
}
|
}
|
||||||
window.swaggerUi = new SwaggerUi({
|
window.swaggerUi = new SwaggerUi({
|
||||||
url: url,
|
url: url,
|
||||||
dom_id: "swagger-ui-container",
|
dom_id: "swagger-ui-container",
|
||||||
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
|
||||||
onComplete: function(swaggerApi, swaggerUi){
|
onComplete: function(swaggerApi, swaggerUi){
|
||||||
log("Loaded SwaggerUI");
|
log("Loaded SwaggerUI");
|
||||||
|
if(typeof initOAuth == "function") {
|
||||||
if(typeof initOAuth == "function") {
|
/*
|
||||||
/*
|
initOAuth({
|
||||||
initOAuth({
|
clientId: "your-client-id",
|
||||||
clientId: "your-client-id",
|
realm: "your-realms",
|
||||||
realm: "your-realms",
|
appName: "your-app-name"
|
||||||
appName: "your-app-name"
|
});
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
$('pre code').each(function(i, e) {
|
||||||
|
hljs.highlightBlock(e)
|
||||||
});
|
});
|
||||||
*/
|
},
|
||||||
}
|
onFailure: function(data) {
|
||||||
$('pre code').each(function(i, e) {
|
log("Unable to Load SwaggerUI");
|
||||||
hljs.highlightBlock(e)
|
},
|
||||||
});
|
docExpansion: "none",
|
||||||
},
|
sorter : "alpha"
|
||||||
onFailure: function(data) {
|
});
|
||||||
log("Unable to Load SwaggerUI");
|
|
||||||
},
|
|
||||||
docExpansion: "none",
|
|
||||||
sorter : "alpha"
|
|
||||||
});
|
|
||||||
|
|
||||||
function addApiKeyAuthorization() {
|
function addApiKeyAuthorization() {
|
||||||
var key = $('#input_apiKey')[0].value;
|
var key = $('#input_apiKey')[0].value;
|
||||||
log("key: " + key);
|
log("key: " + key);
|
||||||
if(key && key.trim() != "") {
|
if(key && key.trim() != "") {
|
||||||
log("added key " + key);
|
log("added key " + key);
|
||||||
window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
|
window.authorizations.add("api_key", new ApiKeyAuthorization("api_key", key, "query"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#input_apiKey').change(function() {
|
$('#input_apiKey').change(function() {
|
||||||
addApiKeyAuthorization();
|
addApiKeyAuthorization();
|
||||||
});
|
});
|
||||||
|
|
||||||
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
|
// if you have an apiKey you would like to pre-populate on the page for demonstration purposes...
|
||||||
/*
|
/*
|
||||||
var apiKey = "myApiKeyXXXX123456789";
|
var apiKey = "myApiKeyXXXX123456789";
|
||||||
$('#input_apiKey').val(apiKey);
|
$('#input_apiKey').val(apiKey);
|
||||||
addApiKeyAuthorization();
|
addApiKeyAuthorization();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
window.swaggerUi.load();
|
window.swaggerUi.load();
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
Reference in New Issue
Block a user