Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dist/lib/swagger-oauth.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ window.onOAuthComplete = function onOAuthComplete(token) {
}
}
});
window.authorizations.add(oauth2KeyName, new ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
window.swaggerUi.api.clientAuthorizations.add(oauth2KeyName, new SwaggerClient.ApiKeyAuthorization('Authorization', 'Bearer ' + b, 'header'));
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion dist/swagger-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -20692,7 +20692,7 @@ SwaggerUi.Views.MainView = Backbone.View.extend({
} else {

// Default validator
this.model.validatorUrl = 'http://online.swagger.io/validator';
this.model.validatorUrl = window.location.protocol + '//online.swagger.io/validator';
}
}
},
Expand Down Expand Up @@ -21358,6 +21358,12 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
code = $('<code />').html(_.escape(content));
pre = $('<pre class="xml" />').append(code);

// Plain Text
} else if (/text\/plain/.test(contentType)) {
code = $('<code />').text(content);
pre = $('<pre class="plain" />').append(code);


// Image
} else if (/^image\//.test(contentType)) {
pre = $('<img>').attr('src', url);
Expand Down
2 changes: 1 addition & 1 deletion dist/swagger-ui.min.js

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/main/javascript/view/OperationView.js
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,12 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
code = $('<code />').html(_.escape(content));
pre = $('<pre class="xml" />').append(code);

// Plain Text
} else if (/text\/plain/.test(contentType)) {
code = $('<code />').text(content);
pre = $('<pre class="plain" />').append(code);


// Image
} else if (/^image\//.test(contentType)) {
pre = $('<img>').attr('src', url);
Expand Down