Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Fix of a bug that happens when the user defines prototype functions for Array #729

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -2401,15 +2401,15 @@ Resolver.prototype.resolve = function (spec, arg1, arg2, arg3) {
var sharedParameters = path.parameters || [];
var parameters = operation.parameters || [];

for (i in sharedParameters) {
for (var i = 0; i < sharedParameters.length; i++) {
var parameter = sharedParameters[i];
parameters.unshift(parameter);
}
if(method !== 'parameters' && _.isObject(operation)) {
operation.parameters = operation.parameters || parameters;
}

for (i in parameters) {
for (var i = 0; i < parameters.length; i++) {
var parameter = parameters[i];
location = '/paths' + name + '/' + method + '/parameters';

Expand Down Expand Up @@ -2721,7 +2721,7 @@ Resolver.prototype.finish = function (spec, root, resolutionTable, resolvedRefs,

for (key in resolvedTo.obj) {
var abs = resolvedTo.obj[key];

if (localResolve !== true) {
// don't retain root for local definitions
abs = this.retainRoot(resolvedTo.obj[key], item.root);
Expand Down Expand Up @@ -18275,7 +18275,7 @@ Request.prototype.type = function(type){
};

/**
* Set responseType to `val`. Presently valid responseTypes are 'blob' and
* Set responseType to `val`. Presently valid responseTypes are 'blob' and
* 'arraybuffer'.
*
* Examples:
Expand Down Expand Up @@ -19164,7 +19164,7 @@ Emitter.prototype.hasListeners = function(event){
* TODO: combatible error handling?
*/

module.exports = function(arr, fn, initial){
module.exports = function(arr, fn, initial){
var idx = 0;
var len = arr.length;
var curr = arguments.length == 3
Expand All @@ -19174,7 +19174,7 @@ module.exports = function(arr, fn, initial){
while (idx < len) {
curr = fn.call(null, curr, arr[idx], ++idx, arr);
}

return curr;
};
},{}]},{},[1])(1)
Expand Down Expand Up @@ -22608,4 +22608,4 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
$('.model-signature', this.$el).append(responseModelView.render().el);
return this;
}
});}).call(this);
});}).call(this);