This commit is contained in:
74
dist/lib/swagger.js
vendored
74
dist/lib/swagger.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
// swagger.js
|
// swagger.js
|
||||||
// version 2.0.36
|
// version 2.0.37
|
||||||
|
|
||||||
var __bind = function(fn, me){
|
var __bind = function(fn, me){
|
||||||
return function(){
|
return function(){
|
||||||
@@ -45,41 +45,40 @@ if (!('map' in Array.prototype)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object.keys = Object.keys || (function () {
|
Object.keys = Object.keys || (function () {
|
||||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||||
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
|
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
|
||||||
DontEnums = [
|
DontEnums = [
|
||||||
'toString',
|
'toString',
|
||||||
'toLocaleString',
|
'toLocaleString',
|
||||||
'valueOf',
|
'valueOf',
|
||||||
'hasOwnProperty',
|
'hasOwnProperty',
|
||||||
'isPrototypeOf',
|
'isPrototypeOf',
|
||||||
'propertyIsEnumerable',
|
'propertyIsEnumerable',
|
||||||
'constructor'
|
'constructor'
|
||||||
],
|
],
|
||||||
DontEnumsLength = DontEnums.length;
|
DontEnumsLength = DontEnums.length;
|
||||||
|
|
||||||
return function (o) {
|
return function (o) {
|
||||||
if (typeof o != "object" && typeof o != "function" || o === null)
|
if (typeof o != "object" && typeof o != "function" || o === null)
|
||||||
throw new TypeError("Object.keys called on a non-object");
|
throw new TypeError("Object.keys called on a non-object");
|
||||||
|
|
||||||
var result = [];
|
var result = [];
|
||||||
for (var name in o) {
|
for (var name in o) {
|
||||||
if (hasOwnProperty.call(o, name))
|
if (hasOwnProperty.call(o, name))
|
||||||
result.push(name);
|
result.push(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasDontEnumBug) {
|
if (hasDontEnumBug) {
|
||||||
for (var i = 0; i < DontEnumsLength; i++) {
|
for (var i = 0; i < DontEnumsLength; i++) {
|
||||||
if (hasOwnProperty.call(o, DontEnums[i]))
|
if (hasOwnProperty.call(o, DontEnums[i]))
|
||||||
result.push(DontEnums[i]);
|
result.push(DontEnums[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
var SwaggerApi = function(url, options) {
|
var SwaggerApi = function(url, options) {
|
||||||
this.url = null;
|
this.url = null;
|
||||||
this.debug = false;
|
this.debug = false;
|
||||||
@@ -158,6 +157,7 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
|
|||||||
}
|
}
|
||||||
this.apis = {};
|
this.apis = {};
|
||||||
this.apisArray = [];
|
this.apisArray = [];
|
||||||
|
this.consumes = response.consumes;
|
||||||
this.produces = response.produces;
|
this.produces = response.produces;
|
||||||
this.authSchemes = response.authorizations;
|
this.authSchemes = response.authorizations;
|
||||||
if (response.info != null) {
|
if (response.info != null) {
|
||||||
@@ -175,13 +175,13 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response.basePath) {
|
if (response.basePath)
|
||||||
this.basePath = 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('?'));
|
this.basePath = this.url.substring(0, this.url.lastIndexOf('?'));
|
||||||
} else {
|
else
|
||||||
this.basePath = this.url;
|
this.basePath = this.url;
|
||||||
}
|
|
||||||
if (isApi) {
|
if (isApi) {
|
||||||
var newName = response.resourcePath.replace(/\//g, '');
|
var newName = response.resourcePath.replace(/\//g, '');
|
||||||
this.resourcePath = response.resourcePath;
|
this.resourcePath = response.resourcePath;
|
||||||
@@ -321,8 +321,8 @@ var SwaggerResource = function(resourceObj, api) {
|
|||||||
var _this = this;
|
var _this = this;
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.api = this.api;
|
this.api = this.api;
|
||||||
produces = [];
|
consumes = (this.consumes | []);
|
||||||
consumes = [];
|
produces = (this.produces | []);
|
||||||
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
||||||
this.description = resourceObj.description;
|
this.description = resourceObj.description;
|
||||||
|
|
||||||
@@ -1191,7 +1191,7 @@ var SwaggerRequest = function(type, url, params, opts, successCallback, errorCal
|
|||||||
SwaggerRequest.prototype.setHeaders = function(params, operation) {
|
SwaggerRequest.prototype.setHeaders = function(params, operation) {
|
||||||
// default type
|
// default type
|
||||||
var accepts = "application/json";
|
var accepts = "application/json";
|
||||||
var contentType = null;
|
var consumes = "application/json";
|
||||||
|
|
||||||
var allDefinedParams = this.operation.parameters;
|
var allDefinedParams = this.operation.parameters;
|
||||||
var definedFormParams = [];
|
var definedFormParams = [];
|
||||||
|
|||||||
2
dist/swagger-ui.js
vendored
2
dist/swagger-ui.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
// swagger-ui.js
|
// swagger-ui.js
|
||||||
// version 2.0.21
|
// version 2.0.22
|
||||||
$(function() {
|
$(function() {
|
||||||
|
|
||||||
// Helper function for vertically aligning DOM elements
|
// Helper function for vertically aligning DOM elements
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// swagger.js
|
// swagger.js
|
||||||
// version 2.0.36
|
// version 2.0.37
|
||||||
|
|
||||||
var __bind = function(fn, me){
|
var __bind = function(fn, me){
|
||||||
return function(){
|
return function(){
|
||||||
@@ -45,41 +45,40 @@ if (!('map' in Array.prototype)) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Object.keys = Object.keys || (function () {
|
Object.keys = Object.keys || (function () {
|
||||||
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
var hasOwnProperty = Object.prototype.hasOwnProperty,
|
||||||
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
|
hasDontEnumBug = !{toString:null}.propertyIsEnumerable("toString"),
|
||||||
DontEnums = [
|
DontEnums = [
|
||||||
'toString',
|
'toString',
|
||||||
'toLocaleString',
|
'toLocaleString',
|
||||||
'valueOf',
|
'valueOf',
|
||||||
'hasOwnProperty',
|
'hasOwnProperty',
|
||||||
'isPrototypeOf',
|
'isPrototypeOf',
|
||||||
'propertyIsEnumerable',
|
'propertyIsEnumerable',
|
||||||
'constructor'
|
'constructor'
|
||||||
],
|
],
|
||||||
DontEnumsLength = DontEnums.length;
|
DontEnumsLength = DontEnums.length;
|
||||||
|
|
||||||
return function (o) {
|
return function (o) {
|
||||||
if (typeof o != "object" && typeof o != "function" || o === null)
|
if (typeof o != "object" && typeof o != "function" || o === null)
|
||||||
throw new TypeError("Object.keys called on a non-object");
|
throw new TypeError("Object.keys called on a non-object");
|
||||||
|
|
||||||
var result = [];
|
var result = [];
|
||||||
for (var name in o) {
|
for (var name in o) {
|
||||||
if (hasOwnProperty.call(o, name))
|
if (hasOwnProperty.call(o, name))
|
||||||
result.push(name);
|
result.push(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hasDontEnumBug) {
|
if (hasDontEnumBug) {
|
||||||
for (var i = 0; i < DontEnumsLength; i++) {
|
for (var i = 0; i < DontEnumsLength; i++) {
|
||||||
if (hasOwnProperty.call(o, DontEnums[i]))
|
if (hasOwnProperty.call(o, DontEnums[i]))
|
||||||
result.push(DontEnums[i]);
|
result.push(DontEnums[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
||||||
var SwaggerApi = function(url, options) {
|
var SwaggerApi = function(url, options) {
|
||||||
this.url = null;
|
this.url = null;
|
||||||
this.debug = false;
|
this.debug = false;
|
||||||
@@ -158,6 +157,7 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
|
|||||||
}
|
}
|
||||||
this.apis = {};
|
this.apis = {};
|
||||||
this.apisArray = [];
|
this.apisArray = [];
|
||||||
|
this.consumes = response.consumes;
|
||||||
this.produces = response.produces;
|
this.produces = response.produces;
|
||||||
this.authSchemes = response.authorizations;
|
this.authSchemes = response.authorizations;
|
||||||
if (response.info != null) {
|
if (response.info != null) {
|
||||||
@@ -175,13 +175,13 @@ SwaggerApi.prototype.buildFromSpec = function(response) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (response.basePath) {
|
if (response.basePath)
|
||||||
this.basePath = 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('?'));
|
this.basePath = this.url.substring(0, this.url.lastIndexOf('?'));
|
||||||
} else {
|
else
|
||||||
this.basePath = this.url;
|
this.basePath = this.url;
|
||||||
}
|
|
||||||
if (isApi) {
|
if (isApi) {
|
||||||
var newName = response.resourcePath.replace(/\//g, '');
|
var newName = response.resourcePath.replace(/\//g, '');
|
||||||
this.resourcePath = response.resourcePath;
|
this.resourcePath = response.resourcePath;
|
||||||
@@ -321,8 +321,8 @@ var SwaggerResource = function(resourceObj, api) {
|
|||||||
var _this = this;
|
var _this = this;
|
||||||
this.api = api;
|
this.api = api;
|
||||||
this.api = this.api;
|
this.api = this.api;
|
||||||
produces = [];
|
consumes = (this.consumes | []);
|
||||||
consumes = [];
|
produces = (this.produces | []);
|
||||||
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
this.path = this.api.resourcePath != null ? this.api.resourcePath : resourceObj.path;
|
||||||
this.description = resourceObj.description;
|
this.description = resourceObj.description;
|
||||||
|
|
||||||
@@ -1191,7 +1191,7 @@ var SwaggerRequest = function(type, url, params, opts, successCallback, errorCal
|
|||||||
SwaggerRequest.prototype.setHeaders = function(params, operation) {
|
SwaggerRequest.prototype.setHeaders = function(params, operation) {
|
||||||
// default type
|
// default type
|
||||||
var accepts = "application/json";
|
var accepts = "application/json";
|
||||||
var contentType = null;
|
var consumes = "application/json";
|
||||||
|
|
||||||
var allDefinedParams = this.operation.parameters;
|
var allDefinedParams = this.operation.parameters;
|
||||||
var definedFormParams = [];
|
var definedFormParams = [];
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "swagger-ui",
|
"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",
|
"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": {
|
"scripts": {
|
||||||
"build": "PATH=$PATH:./node_modules/.bin cake dist",
|
"build": "PATH=$PATH:./node_modules/.bin cake dist",
|
||||||
|
|||||||
Reference in New Issue
Block a user