updated oauth2 support into a single config
This commit is contained in:
14
dist/index.html
vendored
14
dist/index.html
vendored
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user