Commit 0c0ffc56 authored by Tony Tam's avatar Tony Tam
Browse files

updated swagger-client

parent 18ce470f
// Generated by CoffeeScript 1.6.3
(function() {
var ApiKeyAuthorization, PasswordAuthorization, SwaggerApi, SwaggerAuthorizations, SwaggerHttp, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource,
var ApiKeyAuthorization, PasswordAuthorization, SwaggerApi, SwaggerAuthorizations, SwaggerHttp, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource, log,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
log = function() {
if (window.console) {
return console.log.apply(console, arguments);
}
};
SwaggerApi = (function() {
SwaggerApi.prototype.url = "http://api.wordnik.com/v4/resources.json";
......@@ -596,9 +602,9 @@
result = this.refModel.createJSONSample(modelsToIgnore);
} else {
if (this.isCollection) {
result = this.refDataType;
result = this.toSampleValue(this.refDataType);
} else {
result = this.dataType;
result = this.toSampleValue(this.dataType);
}
}
if (this.isCollection) {
......@@ -608,6 +614,22 @@
}
};
SwaggerModelProperty.prototype.toSampleValue = function(value) {
var result;
if (value === "integer") {
result = 0;
} else if (value === "boolean") {
result = false;
} else if (value === "double") {
result = 0.0;
} else if (value === "string") {
result = "";
} else {
result = value;
}
return result;
};
SwaggerModelProperty.prototype.toString = function() {
var req, str;
req = this.required ? 'propReq' : 'propOpt';
......
// Generated by CoffeeScript 1.6.3
(function() {
var ApiKeyAuthorization, PasswordAuthorization, SwaggerApi, SwaggerAuthorizations, SwaggerHttp, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource,
var ApiKeyAuthorization, PasswordAuthorization, SwaggerApi, SwaggerAuthorizations, SwaggerHttp, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource, log,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
__indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; };
log = function() {
if (window.console) {
return console.log.apply(console, arguments);
}
};
SwaggerApi = (function() {
SwaggerApi.prototype.url = "http://api.wordnik.com/v4/resources.json";
......@@ -596,9 +602,9 @@
result = this.refModel.createJSONSample(modelsToIgnore);
} else {
if (this.isCollection) {
result = this.refDataType;
result = this.toSampleValue(this.refDataType);
} else {
result = this.dataType;
result = this.toSampleValue(this.dataType);
}
}
if (this.isCollection) {
......@@ -608,6 +614,22 @@
}
};
SwaggerModelProperty.prototype.toSampleValue = function(value) {
var result;
if (value === "integer") {
result = 0;
} else if (value === "boolean") {
result = false;
} else if (value === "double") {
result = 0.0;
} else if (value === "string") {
result = "";
} else {
result = value;
}
return result;
};
SwaggerModelProperty.prototype.toString = function() {
var req, str;
req = this.required ? 'propReq' : 'propOpt';
......
{
"name": "swagger-ui",
"version": "2.0.5",
"version": "2.0.6",
"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",
......@@ -19,7 +19,7 @@
"readmeFilename": "README.md",
"dependencies": {
"coffee-script": "~1.5.0",
"swagger-client": "2.0.11",
"swagger-client": "2.0.12",
"handlebars": "~1.0.10",
"less": "~1.4.2"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment