updated swagger-js per https://github.com/wordnik/swagger-ui/pull/394#issuecomment-35181116 https://github.com/wordnik/swagger-ui/pull/394#issuecomment-35181116
This commit is contained in:
32
dist/lib/swagger.js
vendored
32
dist/lib/swagger.js
vendored
@@ -1,5 +1,5 @@
|
|||||||
// swagger.js
|
// swagger.js
|
||||||
// version 2.0.14
|
// version 2.0.15
|
||||||
|
|
||||||
var __bind = function(fn, me){
|
var __bind = function(fn, me){
|
||||||
return function(){
|
return function(){
|
||||||
@@ -392,7 +392,7 @@ SwaggerResource.prototype.addOperations = function(resource_path, ops, consumes,
|
|||||||
}
|
}
|
||||||
if (o.errorResponses) {
|
if (o.errorResponses) {
|
||||||
responseMessages = o.errorResponses;
|
responseMessages = o.errorResponses;
|
||||||
for (j = 0; j < responseMessages.length; j++) {
|
for (var j = 0; j < responseMessages.length; j++) {
|
||||||
r = responseMessages[j];
|
r = responseMessages[j];
|
||||||
r.message = r.reason;
|
r.message = r.reason;
|
||||||
r.reason = null;
|
r.reason = null;
|
||||||
@@ -659,19 +659,21 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
|
|||||||
param.isList = true;
|
param.isList = true;
|
||||||
if(param.allowableValues != null) {
|
if(param.allowableValues != null) {
|
||||||
param.allowableValues.descriptiveValues = [];
|
param.allowableValues.descriptiveValues = [];
|
||||||
for(j = 0; j < param.allowableValues.values; j++){
|
if(param.allowableValues.values) {
|
||||||
var v = param.allowableValues.values[j];
|
for(j = 0; j < param.allowableValues.values.length; j++){
|
||||||
if(param.defaultValue != null) {
|
var v = param.allowableValues.values[j];
|
||||||
param.allowableValues.descriptiveValues.push ({
|
if(param.defaultValue != null) {
|
||||||
value: String(v),
|
param.allowableValues.descriptiveValues.push ({
|
||||||
isDefault: (v === param.defaultValue)
|
value: String(v),
|
||||||
});
|
isDefault: (v === param.defaultValue)
|
||||||
}
|
});
|
||||||
else {
|
}
|
||||||
param.allowableValues.descriptiveValues.push ({
|
else {
|
||||||
value: String(v),
|
param.allowableValues.descriptiveValues.push ({
|
||||||
isDefault: false
|
value: String(v),
|
||||||
});
|
isDefault: false
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// swagger.js
|
// swagger.js
|
||||||
// version 2.0.14
|
// version 2.0.15
|
||||||
|
|
||||||
var __bind = function(fn, me){
|
var __bind = function(fn, me){
|
||||||
return function(){
|
return function(){
|
||||||
@@ -392,7 +392,7 @@ SwaggerResource.prototype.addOperations = function(resource_path, ops, consumes,
|
|||||||
}
|
}
|
||||||
if (o.errorResponses) {
|
if (o.errorResponses) {
|
||||||
responseMessages = o.errorResponses;
|
responseMessages = o.errorResponses;
|
||||||
for (j = 0; j < responseMessages.length; j++) {
|
for (var j = 0; j < responseMessages.length; j++) {
|
||||||
r = responseMessages[j];
|
r = responseMessages[j];
|
||||||
r.message = r.reason;
|
r.message = r.reason;
|
||||||
r.reason = null;
|
r.reason = null;
|
||||||
@@ -659,19 +659,21 @@ var SwaggerOperation = function(nickname, path, method, parameters, summary, not
|
|||||||
param.isList = true;
|
param.isList = true;
|
||||||
if(param.allowableValues != null) {
|
if(param.allowableValues != null) {
|
||||||
param.allowableValues.descriptiveValues = [];
|
param.allowableValues.descriptiveValues = [];
|
||||||
for(j = 0; j < param.allowableValues.values; j++){
|
if(param.allowableValues.values) {
|
||||||
var v = param.allowableValues.values[j];
|
for(j = 0; j < param.allowableValues.values.length; j++){
|
||||||
if(param.defaultValue != null) {
|
var v = param.allowableValues.values[j];
|
||||||
param.allowableValues.descriptiveValues.push ({
|
if(param.defaultValue != null) {
|
||||||
value: String(v),
|
param.allowableValues.descriptiveValues.push ({
|
||||||
isDefault: (v === param.defaultValue)
|
value: String(v),
|
||||||
});
|
isDefault: (v === param.defaultValue)
|
||||||
}
|
});
|
||||||
else {
|
}
|
||||||
param.allowableValues.descriptiveValues.push ({
|
else {
|
||||||
value: String(v),
|
param.allowableValues.descriptiveValues.push ({
|
||||||
isDefault: false
|
value: String(v),
|
||||||
});
|
isDefault: false
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "swagger-ui",
|
"name": "swagger-ui",
|
||||||
"version": "2.0.8",
|
"version": "2.0.9",
|
||||||
"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