merged
This commit is contained in:
15
dist/swagger-ui.js
vendored
15
dist/swagger-ui.js
vendored
File diff suppressed because one or more lines are too long
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
@@ -6,6 +6,19 @@ SwaggerUi.Models.Oauth2Model = Backbone.Model.extend({
|
||||
},
|
||||
|
||||
initialize: function () {
|
||||
if(this.attributes && this.attributes.scopes) {
|
||||
var attributes = _.cloneDeep(this.attributes);
|
||||
var i, scopes = [];
|
||||
for(i in attributes.scopes) {
|
||||
var scope = attributes.scopes[i];
|
||||
if(typeof scope.description === 'string') {
|
||||
scopes[scope] = attributes.scopes[i];
|
||||
scopes.push(attributes.scopes[i]);
|
||||
}
|
||||
}
|
||||
attributes.scopes = scopes;
|
||||
this.attributes = attributes;
|
||||
}
|
||||
this.on('change', this.validate);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user