Merge pull request #1036 from mohsen1/remove-swaggerui-global-instance
Remove swaggerui global instance
This commit is contained in:
@@ -14,6 +14,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
|
||||
initialize: function(opts) {
|
||||
opts = opts || {};
|
||||
this.router = opts.router;
|
||||
this.auths = opts.auths;
|
||||
this.parentId = this.model.parentId;
|
||||
this.nickname = this.model.nickname;
|
||||
@@ -165,6 +166,7 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
if (signatureModel) {
|
||||
responseSignatureView = new SwaggerUi.Views.SignatureView({
|
||||
model: signatureModel,
|
||||
router: this.router,
|
||||
tagName: 'div'
|
||||
});
|
||||
$('.model-signature', $(this.el)).append(responseSignatureView.render().el);
|
||||
@@ -200,7 +202,8 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
param.type = type;
|
||||
}
|
||||
responseContentTypeView = new SwaggerUi.Views.ResponseContentTypeView({
|
||||
model: contentTypeModel
|
||||
model: contentTypeModel,
|
||||
router: this.router
|
||||
});
|
||||
$('.response-content-type', $(this.el)).append(responseContentTypeView.render().el);
|
||||
ref4 = this.model.parameters;
|
||||
@@ -229,7 +232,11 @@ SwaggerUi.Views.OperationView = Backbone.View.extend({
|
||||
|
||||
addStatusCode: function(statusCode) {
|
||||
// Render status codes
|
||||
var statusCodeView = new SwaggerUi.Views.StatusCodeView({model: statusCode, tagName: 'tr'});
|
||||
var statusCodeView = new SwaggerUi.Views.StatusCodeView({
|
||||
model: statusCode,
|
||||
tagName: 'tr',
|
||||
router: this.router
|
||||
});
|
||||
$('.operation-status', $(this.el)).append(statusCodeView.render().el);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user