Merge remote-tracking branch 'swagger/develop_2.0' into JSONEditorMerge
Conflicts: dist/index.html dist/swagger-ui.js dist/swagger-ui.min.js src/main/html/index.html src/main/template/param.handlebars src/main/template/param_required.handlebars
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
/*global JSONEditor*/
|
||||
'use strict';
|
||||
|
||||
window.SwaggerUi = Backbone.Router.extend({
|
||||
@@ -13,6 +14,9 @@ window.SwaggerUi = Backbone.Router.extend({
|
||||
// SwaggerUi accepts all the same options as SwaggerApi
|
||||
initialize: function(options) {
|
||||
options = options || {};
|
||||
if(!options.highlightSizeThreshold) {
|
||||
options.highlightSizeThreshold = 100000;
|
||||
}
|
||||
|
||||
// Allow dom_id to be overridden
|
||||
if (options.dom_id) {
|
||||
@@ -97,7 +101,9 @@ window.SwaggerUi = Backbone.Router.extend({
|
||||
if (url && url.indexOf('http') !== 0) {
|
||||
url = this.buildUrl(window.location.href.toString(), url);
|
||||
}
|
||||
|
||||
if(this.api) {
|
||||
this.options.authorizations = this.api.clientAuthorizations.authz;
|
||||
}
|
||||
this.options.url = url;
|
||||
this.headerView.update(url);
|
||||
|
||||
@@ -180,7 +186,7 @@ window.SwaggerUi = Backbone.Router.extend({
|
||||
}
|
||||
$('#message-bar').removeClass('message-fail');
|
||||
$('#message-bar').addClass('message-success');
|
||||
$('#message-bar').html(data);
|
||||
$('#message-bar').text(data);
|
||||
},
|
||||
|
||||
// shows message in red
|
||||
@@ -191,7 +197,7 @@ window.SwaggerUi = Backbone.Router.extend({
|
||||
$('#message-bar').removeClass('message-success');
|
||||
$('#message-bar').addClass('message-fail');
|
||||
|
||||
var val = $('#message-bar').html(data);
|
||||
var val = $('#message-bar').text(data);
|
||||
|
||||
if (this.options.onFailure) {
|
||||
this.options.onFailure(data);
|
||||
@@ -205,6 +211,10 @@ window.SwaggerUi = Backbone.Router.extend({
|
||||
$('.markdown').each(function(){
|
||||
$(this).html(marked($(this).html()));
|
||||
});
|
||||
|
||||
$('.propDesc', '.model-signature .description').each(function () {
|
||||
$(this).html(marked($(this).html())).addClass('markdown');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
@@ -263,4 +273,4 @@ window.SwaggerUi.Views = {};
|
||||
}
|
||||
}(this, function () {
|
||||
return SwaggerUi;
|
||||
}));
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user