Fix $ref strings treated as objects by JSONEditor

This commit is contained in:
Gareth Kirwan
2015-09-08 15:47:42 +01:00
parent 2763800bee
commit 4288506957

View File

@@ -74,8 +74,10 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
// is there any valid case were it should not be added ?
var def;
for(def in this.model.definitions){
if (this.model.definitions[def].type === null){
this.model.definitions[def].type = 'object';
}
}
},