@@ -141,7 +141,7 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth
141
141
response = responses [ 'default' ] ;
142
142
defaultResponseCode = 'default' ;
143
143
}
144
-
144
+
145
145
if ( response && response . schema ) {
146
146
var resolvedModel = this . resolveModel ( response . schema , definitions ) ;
147
147
var successResponse ;
@@ -150,7 +150,7 @@ var Operation = module.exports = function (parent, scheme, operationId, httpMeth
150
150
151
151
if ( resolvedModel ) {
152
152
this . successResponse = { } ;
153
- successResponse = this . successResponse [ defaultResponseCode ] = resolvedModel ;
153
+ successResponse = this . successResponse [ defaultResponseCode ] = resolvedModel ;
154
154
} else if ( ! response . schema . type || response . schema . type === 'object' || response . schema . type === 'array' ) {
155
155
// Inline model
156
156
this . successResponse = { } ;
@@ -539,8 +539,8 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) {
539
539
success = ( success || helpers . log ) ;
540
540
error = ( error || helpers . log ) ;
541
541
542
- if ( opts . useJQuery ) {
543
- this . useJQuery = opts . useJQuery ;
542
+ if ( typeof opts . useJQuery === 'undefined' ) {
543
+ opts . useJQuery = this . useJQuery ;
544
544
}
545
545
546
546
var missingParams = this . getMissingParams ( args ) ;
@@ -579,7 +579,7 @@ Operation.prototype.execute = function (arg1, arg2, arg3, arg4, parent) {
579
579
url : url ,
580
580
method : this . method . toUpperCase ( ) ,
581
581
body : body ,
582
- useJQuery : this . useJQuery ,
582
+ useJQuery : opts . useJQuery ,
583
583
headers : headers ,
584
584
on : {
585
585
response : function ( response ) {
@@ -762,7 +762,7 @@ Operation.prototype.encodeQueryCollection = function (type, name, value) {
762
762
separator = '\\t' ;
763
763
} else if ( type === 'pipes' ) {
764
764
separator = '|' ;
765
- } else if ( type === 'brackets' ) {
765
+ } else if ( type === 'brackets' ) {
766
766
for ( i = 0 ; i < value . length ; i ++ ) {
767
767
if ( i !== 0 ) {
768
768
encoded += '&' ;
0 commit comments