Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Aug 6, 2014
1 parent 4ea2085 commit ee19963
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 80 deletions.
78 changes: 39 additions & 39 deletions dist/lib/swagger.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// swagger.js
// version 2.0.36
// version 2.0.37

var __bind = function(fn, me){
return function(){
Expand Down Expand Up @@ -45,41 +45,40 @@ if (!('map' in Array.prototype)) {
}

Object.keys = Object.keys || (function () {
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
DontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
DontEnumsLength = DontEnums.length;

return function (o) {
if (typeof o != "object" && typeof o != "function" || o === null)
throw new TypeError("Object.keys called on a non-object");

var result = [];
for (var name in o) {
if (hasOwnProperty.call(o, name))
result.push(name);
}
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
DontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
DontEnumsLength = DontEnums.length;

return function (o) {
if (typeof o != "object" && typeof o != "function" || o === null)
throw new TypeError("Object.keys called on a non-object");

var result = [];
for (var name in o) {
if (hasOwnProperty.call(o, name))
result.push(name);
}

if (hasDontEnumBug) {
for (var i = 0; i < DontEnumsLength; i++) {
if (hasOwnProperty.call(o, DontEnums[i]))
result.push(DontEnums[i]);
}
}
if (hasDontEnumBug) {
for (var i = 0; i < DontEnumsLength; i++) {
if (hasOwnProperty.call(o, DontEnums[i]))
result.push(DontEnums[i]);
}
}

return result;
};
return result;
};
})();


var SwaggerApi = function(url, options) {
this.url = null;
this.debug = false;
Expand Down Expand Up @@ -158,6 +157,7 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
}
this.apis = {};
this.apisArray = [];
this.consumes = response.consumes;
this.produces = response.produces;
this.authSchemes = response.authorizations;
if (response.info != null) {
Expand All @@ -175,13 +175,13 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
}
}
}
if (response.basePath) {
if (response.basePath)
this.basePath = response.basePath;
} else if (this.url.indexOf('?') > 0) {
else if (this.url.indexOf('?') > 0)
this.basePath = this.url.substring(0, this.url.lastIndexOf('?'));
} else {
else
this.basePath = this.url;
}

if (isApi) {
var newName = response.resourcePath.replace(/\//g, '');
this.resourcePath = response.resourcePath;
Expand Down Expand Up @@ -321,8 +321,8 @@ var SwaggerResource = function(resourceObj, api) {
var _this = this;
this.api = api;
this.api = this.api;
produces = [];
consumes = [];
consumes = (this.consumes | []);
produces = (this.produces | []);
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
this.description = resourceObj.description;

Expand Down Expand Up @@ -1191,7 +1191,7 @@ var SwaggerRequest = function(type, url, params, opts, successCallback, errorCal
SwaggerRequest.prototype.setHeaders = function(params, operation) {
// default type
var accepts = "application/json";
var contentType = null;
var consumes = "application/json";

var allDefinedParams = this.operation.parameters;
var definedFormParams = [];
Expand Down
2 changes: 1 addition & 1 deletion dist/swagger-ui.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// swagger-ui.js
// version 2.0.21
// version 2.0.22
$(function() {

// Helper function for vertically aligning DOM elements
Expand Down
78 changes: 39 additions & 39 deletions lib/swagger.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// swagger.js
// version 2.0.36
// version 2.0.37

var __bind = function(fn, me){
return function(){
Expand Down Expand Up @@ -45,41 +45,40 @@ if (!('map' in Array.prototype)) {
}

Object.keys = Object.keys || (function () {
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
DontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
DontEnumsLength = DontEnums.length;

return function (o) {
if (typeof o != "object" && typeof o != "function" || o === null)
throw new TypeError("Object.keys called on a non-object");

var result = [];
for (var name in o) {
if (hasOwnProperty.call(o, name))
result.push(name);
}
var hasOwnProperty = Object.prototype.hasOwnProperty,
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
DontEnums = [
'toString',
'toLocaleString',
'valueOf',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'constructor'
],
DontEnumsLength = DontEnums.length;

return function (o) {
if (typeof o != "object" && typeof o != "function" || o === null)
throw new TypeError("Object.keys called on a non-object");

var result = [];
for (var name in o) {
if (hasOwnProperty.call(o, name))
result.push(name);
}

if (hasDontEnumBug) {
for (var i = 0; i < DontEnumsLength; i++) {
if (hasOwnProperty.call(o, DontEnums[i]))
result.push(DontEnums[i]);
}
}
if (hasDontEnumBug) {
for (var i = 0; i < DontEnumsLength; i++) {
if (hasOwnProperty.call(o, DontEnums[i]))
result.push(DontEnums[i]);
}
}

return result;
};
return result;
};
})();


var SwaggerApi = function(url, options) {
this.url = null;
this.debug = false;
Expand Down Expand Up @@ -158,6 +157,7 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
}
this.apis = {};
this.apisArray = [];
this.consumes = response.consumes;
this.produces = response.produces;
this.authSchemes = response.authorizations;
if (response.info != null) {
Expand All @@ -175,13 +175,13 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
}
}
}
if (response.basePath) {
if (response.basePath)
this.basePath = response.basePath;
} else if (this.url.indexOf('?') > 0) {
else if (this.url.indexOf('?') > 0)
this.basePath = this.url.substring(0, this.url.lastIndexOf('?'));
} else {
else
this.basePath = this.url;
}

if (isApi) {
var newName = response.resourcePath.replace(/\//g, '');
this.resourcePath = response.resourcePath;
Expand Down Expand Up @@ -321,8 +321,8 @@ var SwaggerResource = function(resourceObj, api) {
var _this = this;
this.api = api;
this.api = this.api;
produces = [];
consumes = [];
consumes = (this.consumes | []);
produces = (this.produces | []);
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
this.description = resourceObj.description;

Expand Down Expand Up @@ -1191,7 +1191,7 @@ var SwaggerRequest = function(type, url, params, opts, successCallback, errorCal
SwaggerRequest.prototype.setHeaders = function(params, operation) {
// default type
var accepts = "application/json";
var contentType = null;
var consumes = "application/json";

var allDefinedParams = this.operation.parameters;
var definedFormParams = [];
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "swagger-ui",
"version": "2.0.21",
"version": "2.0.22",
"description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API",
"scripts": {
"build": "PATH=$PATH:./node_modules/.bin cake dist",
Expand Down

0 comments on commit ee19963

Please sign in to comment.