updated oauth2 support into a single config

This commit is contained in:
Tony Tam
2014-03-20 15:38:30 -07:00
parent 2edd7ac058
commit 96c14e43a9
6 changed files with 99 additions and 35 deletions

14
dist/index.html vendored
View File

@@ -17,12 +17,9 @@
<script src='swagger-ui.js' type='text/javascript'></script>
<script src='lib/highlight.7.3.pack.js' type='text/javascript'></script>
<!--script src='lib/swagger-oauth.js' type='text/javascript'></script-->
<script src='lib/swagger-oauth.js' type='text/javascript'></script>
<script type="text/javascript">
// var clientId = "your-client-id";
// var realm = "your-realm";
$(function () {
window.swaggerUi = new SwaggerUi({
url: "http://petstore.swagger.wordnik.com/api/api-docs",
@@ -30,9 +27,12 @@
supportedSubmitMethods: ['get', 'post', 'put', 'delete'],
onComplete: function(swaggerApi, swaggerUi){
log("Loaded SwaggerUI");
/*if(typeof initOAuth == "function")
initOAuth();
*/
if(typeof initOAuth == "function")
initOAuth({
clientId: "me",
realm: "realms"
});
$('pre code').each(function(i, e) {hljs.highlightBlock(e)});
},
onFailure: function(data) {