Found a bug in OperationView.js which caused the oAuth toggle to be displayed for non-oAuth endpoints if oAuth was enabled at all, fixed it
This commit is contained in:
@@ -95,9 +95,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
for (l = 0, len = modelAuths.length; l < len; l++) {
|
for (l = 0, len = modelAuths.length; l < len; l++) {
|
||||||
auths = modelAuths[l];
|
auths = modelAuths[l];
|
||||||
for (key in auths) {
|
for (key in auths) {
|
||||||
auth = auths[key];
|
|
||||||
for (a in this.auths) {
|
for (a in this.auths) {
|
||||||
auth = this.auths[a];
|
auth = this.auths[a];
|
||||||
|
if (key === auth.name) {
|
||||||
if (auth.type === 'oauth2') {
|
if (auth.type === 'oauth2') {
|
||||||
this.model.oauth = {};
|
this.model.oauth = {};
|
||||||
this.model.oauth.scopes = [];
|
this.model.oauth.scopes = [];
|
||||||
@@ -117,6 +117,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
for (k in modelAuths) {
|
for (k in modelAuths) {
|
||||||
v = modelAuths[k];
|
v = modelAuths[k];
|
||||||
|
|||||||
Reference in New Issue
Block a user