We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46fbae2 commit 47ab2a3Copy full SHA for 47ab2a3
src/main/javascript/view/Oauth2Model.js
@@ -6,6 +6,19 @@ SwaggerUi.Models.Oauth2Model = Backbone.Model.extend({
6
},
7
8
initialize: function () {
9
+ if(this.attributes && this.attributes.scopes) {
10
+ var attributes = _.cloneDeep(this.attributes);
11
+ var i, scopes = [];
12
+ for(i in attributes.scopes) {
13
+ var scope = attributes.scopes[i];
14
+ if(typeof scope.description === 'string') {
15
+ scopes[scope] = attributes.scopes[i];
16
+ scopes.push(attributes.scopes[i]);
17
+ }
18
19
+ attributes.scopes = scopes;
20
+ this.attributes = attributes;
21
22
this.on('change', this.validate);
23
24
0 commit comments