Merge pull request #1387 from brownstein/fix-oauth-toggle-on-operations
Fix incorrect display of oAuth toggle in non-oAuth operation views
This commit is contained in:
@@ -89,9 +89,9 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
for (l = 0, len = modelAuths.length; l < len; l++) {
|
||||
auths = modelAuths[l];
|
||||
for (key in auths) {
|
||||
auth = auths[key];
|
||||
for (a in this.auths) {
|
||||
auth = this.auths[a];
|
||||
if (key === auth.name) {
|
||||
if (auth.type === 'oauth2') {
|
||||
this.model.oauth = {};
|
||||
this.model.oauth.scopes = [];
|
||||
@@ -111,6 +111,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (k in modelAuths) {
|
||||
v = modelAuths[k];
|
||||
|
||||
Reference in New Issue
Block a user