@@ -97,6 +97,7 @@ onComplete | This is a callback function parameter which can be passed to be not
|
|||||||
onFailure | This is a callback function parameter which can be passed to be notified of when SwaggerUI encountered a failure was unable to render.
|
onFailure | This is a callback function parameter which can be passed to be notified of when SwaggerUI encountered a failure was unable to render.
|
||||||
highlightSizeThreshold | Any size response below this threshold will be highlighted syntactically, attempting to highlight large responses can lead to browser hangs, not including a threshold will default to highlight all returned responses.
|
highlightSizeThreshold | Any size response below this threshold will be highlighted syntactically, attempting to highlight large responses can lead to browser hangs, not including a threshold will default to highlight all returned responses.
|
||||||
supportedSubmitMethods | An array of of the HTTP operations that will have the 'Try it out!` option. An empty array disables all operations. This does not filter the operations from the display.
|
supportedSubmitMethods | An array of of the HTTP operations that will have the 'Try it out!` option. An empty array disables all operations. This does not filter the operations from the display.
|
||||||
|
redirectUrl | OAuth redirect URL
|
||||||
|
|
||||||
* All other parameters are explained in greater detail below
|
* All other parameters are explained in greater detail below
|
||||||
|
|
||||||
|
|||||||
3
dist/lib/swagger-oauth.js
vendored
3
dist/lib/swagger-oauth.js
vendored
@@ -97,7 +97,8 @@ function handleLogin() {
|
|||||||
var authSchemes = window.swaggerUi.api.authSchemes;
|
var authSchemes = window.swaggerUi.api.authSchemes;
|
||||||
var host = window.location;
|
var host = window.location;
|
||||||
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
|
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
|
||||||
var redirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
|
var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
|
||||||
|
var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
|
||||||
var url = null;
|
var url = null;
|
||||||
|
|
||||||
for (var key in authSchemes) {
|
for (var key in authSchemes) {
|
||||||
|
|||||||
4
dist/swagger-ui.js
vendored
4
dist/swagger-ui.js
vendored
@@ -38,6 +38,10 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof options.redirectUrl === 'string') {
|
||||||
|
window.oAuthRedirectUrl = options.redirectUrl;
|
||||||
|
}
|
||||||
|
|
||||||
// Create an empty div which contains the dom_id
|
// Create an empty div which contains the dom_id
|
||||||
if (! $('#' + this.dom_id).length){
|
if (! $('#' + this.dom_id).length){
|
||||||
$('body').append('<div id="' + this.dom_id + '"></div>') ;
|
$('body').append('<div id="' + this.dom_id + '"></div>') ;
|
||||||
|
|||||||
4
dist/swagger-ui.min.js
vendored
4
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -97,7 +97,8 @@ function handleLogin() {
|
|||||||
var authSchemes = window.swaggerUi.api.authSchemes;
|
var authSchemes = window.swaggerUi.api.authSchemes;
|
||||||
var host = window.location;
|
var host = window.location;
|
||||||
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
|
var pathname = location.pathname.substring(0, location.pathname.lastIndexOf("/"));
|
||||||
var redirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
|
var defaultRedirectUrl = host.protocol + '//' + host.host + pathname + '/o2c.html';
|
||||||
|
var redirectUrl = window.oAuthRedirectUrl || defaultRedirectUrl;
|
||||||
var url = null;
|
var url = null;
|
||||||
|
|
||||||
for (var key in authSchemes) {
|
for (var key in authSchemes) {
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ window.SwaggerUi = Backbone.Router.extend({
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (typeof options.redirectUrl === 'string') {
|
||||||
|
window.oAuthRedirectUrl = options.redirectUrl;
|
||||||
|
}
|
||||||
|
|
||||||
// Create an empty div which contains the dom_id
|
// Create an empty div which contains the dom_id
|
||||||
if (! $('#' + this.dom_id).length){
|
if (! $('#' + this.dom_id).length){
|
||||||
$('body').append('<div id="' + this.dom_id + '"></div>') ;
|
$('body').append('<div id="' + this.dom_id + '"></div>') ;
|
||||||
|
|||||||
Reference in New Issue
Block a user