This commit is contained in:
Ayush Gupta
2012-11-05 13:31:17 +05:30
parent 4a77d5a20f
commit 8d3a5010b4
2 changed files with 6 additions and 0 deletions

View File

@@ -41,6 +41,7 @@
this.failure = options.failure != null ? options.failure : function() {};
this.progress = options.progress != null ? options.progress : function() {};
this.headers = options.headers != null ? options.headers : {};
this.booleanValues = options.booleanValues != null ? options.booleanValues : new Array('true', 'false');
this.discoveryUrl = this.suffixApiKey(this.discoveryUrl);
if (options.success != null) {
this.build();
@@ -263,6 +264,10 @@
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
parameter = _ref[_i];
parameter.name = parameter.name || parameter.dataType;
if (parameter.dataType.toLowerCase() === 'boolean') {
parameter.allowableValues = {};
parameter.allowableValues.values = this.resource.api.booleanValues;
}
if (parameter.allowableValues != null) {
if (parameter.allowableValues.valueType === "RANGE") {
parameter.isRange = true;