This commit is contained in:
Ayush Gupta
2012-12-03 22:57:02 +05:30
parent 24dc86fb4c
commit 5e714918aa

View File

@@ -1,4 +1,4 @@
// Generated by CoffeeScript 1.3.3 // Generated by CoffeeScript 1.4.0
(function() { (function() {
var SwaggerApi, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource, var SwaggerApi, SwaggerModel, SwaggerModelProperty, SwaggerOperation, SwaggerRequest, SwaggerResource,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
@@ -235,10 +235,12 @@
var model, modelName, swaggerModel, _i, _len, _ref, _results; var model, modelName, swaggerModel, _i, _len, _ref, _results;
if (models != null) { if (models != null) {
for (modelName in models) { for (modelName in models) {
if (!(this.models[modelName] != null)) {
swaggerModel = new SwaggerModel(modelName, models[modelName]); swaggerModel = new SwaggerModel(modelName, models[modelName]);
this.modelsArray.push(swaggerModel); this.modelsArray.push(swaggerModel);
this.models[modelName] = swaggerModel; this.models[modelName] = swaggerModel;
} }
}
_ref = this.modelsArray; _ref = this.modelsArray;
_results = []; _results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) { for (_i = 0, _len = _ref.length; _i < _len; _i++) {
@@ -255,7 +257,7 @@
_results = []; _results = [];
for (_i = 0, _len = ops.length; _i < _len; _i++) { for (_i = 0, _len = ops.length; _i < _len; _i++) {
o = ops[_i]; o = ops[_i];
op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters, o.summary, o.notes, o.responseClass, o.errorResponses, this, o.supportedContentTypes); op = new SwaggerOperation(o.nickname, resource_path, o.httpMethod, o.parameters, o.summary, o.notes, o.responseClass, o.errorResponses, this);
this.operations[op.nickname] = op; this.operations[op.nickname] = op;
_results.push(this.operationsArray.push(op)); _results.push(this.operationsArray.push(op));
} }
@@ -413,7 +415,7 @@
SwaggerOperation = (function() { SwaggerOperation = (function() {
function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, responseClass, errorResponses, resource, supportedContentTypes) { function SwaggerOperation(nickname, path, httpMethod, parameters, summary, notes, responseClass, errorResponses, resource) {
var parameter, v, _i, _j, _len, _len1, _ref, _ref1, _ref2, var parameter, v, _i, _j, _len, _len1, _ref, _ref1, _ref2,
_this = this; _this = this;
this.nickname = nickname; this.nickname = nickname;
@@ -425,7 +427,6 @@
this.responseClass = responseClass; this.responseClass = responseClass;
this.errorResponses = errorResponses; this.errorResponses = errorResponses;
this.resource = resource; this.resource = resource;
this.supportedContentTypes = supportedContentTypes;
this["do"] = __bind(this["do"], this); this["do"] = __bind(this["do"], this);
if (this.nickname == null) { if (this.nickname == null) {
@@ -446,7 +447,6 @@
} }
if (this.responseClass != null) { if (this.responseClass != null) {
this.responseClassSignature = this.getSignature(this.responseClass, this.resource.models); this.responseClassSignature = this.getSignature(this.responseClass, this.resource.models);
this.responseSampleJSON = this.getSampleJSON(this.responseClass, this.resource.models);
} }
this.errorResponses = this.errorResponses || []; this.errorResponses = this.errorResponses || [];
_ref1 = this.parameters; _ref1 = this.parameters;