Ver a proveniência

Merge pull request #2521 from swagger-api/issue-2483

fixed scopes issue
bubble
Tony Tam há 7 anos
committed by GitHub
ascendente
cometimento
30f0848ac2
4 ficheiros alterados com 69 adições e 28 eliminações
  1. +47
    -19
      dist/swagger-ui.js
  2. +8
    -8
      dist/swagger-ui.min.js
  3. +1
    -1
      package.json
  4. +13
    -0
      src/main/javascript/view/Oauth2Model.js

+ 47
- 19
dist/swagger-ui.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 8
- 8
dist/swagger-ui.min.js
A apresentação das diferenças no ficheiro foi suprimida por ser demasiado grande
Ver ficheiro


+ 1
- 1
package.json Ver ficheiro

@@ -61,6 +61,6 @@
"phantomjs": "1.9.19",
"selenium-webdriver": "^2.45.0",
"sinon-chai": "2.8.0",
"swagger-client": "2.1.23"
"swagger-client": "2.1.24"
}
}

+ 13
- 0
src/main/javascript/view/Oauth2Model.js Ver ficheiro

@@ -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);
},



Carregando…
Cancelar
Guardar