diff --git a/src/main/javascript/view/OperationView.js b/src/main/javascript/view/OperationView.js index 8c7c9b8a..8d45337b 100644 --- a/src/main/javascript/view/OperationView.js +++ b/src/main/javascript/view/OperationView.js @@ -788,6 +788,11 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({ $('.request_headers', $(this.el)).html('
' + _.escape(JSON.stringify(requestHeaders, null, '  ')).replace(/\n/g, '
') + '
'); } + // Call user-defined hook + if (opts.responseHooks && opts.responseHooks[this.nickname]) { + opts.responseHooks[this.nickname](response, this); + } + var response_body_el = $('.response_body', $(this.el))[0]; // only highlight the response if response is less than threshold, default state is highlight response if (opts.highlightSizeThreshold && typeof response.data !== 'undefined' && response.data.length > opts.highlightSizeThreshold) {