text: // Generated by CoffeeScript 1.4.0
  (function() {
  
    window.api_key = 'special-key';
  
    describe('SwaggerRequest', function() {
      beforeEach(function() {
        var success;
        success = function() {
          return console.log("success");
        };
        window.authorizations.add("key", new ApiKeyAuthorization("api_key", "special-key", "header"));
        window.swagger = new SwaggerApi({
          url: 'http://localhost:8002/api/api-docs',
          success: success
        });
        return waitsFor(function() {
          return swagger.ready != null;
        });
      });
      describe("verifies the nickname is sanitized", function() {
        it("returns the same nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("getSomething")).toBe("getSomething");
        });
        it("strips spaces in the nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("get something")).toBe("get_something");
        });
        it("strips dots in the nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("get.something")).toBe("get_something");
        });
        it("strips $ in the nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("get$something")).toBe("get_something");
        });
        it("strips punctuation in the nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("get[something]")).toBe("get_something");
        });
        it("strips curlies in the nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("get{something}")).toBe("get_something");
        });
        return it("strips punctuation in the nickname", function() {
          var pet;
          pet = window.swagger.apis.pet;
          return expect(pet.sanitize("  \\]}{Get$$_./\[something]")).toBe("Get_something");
        });
      });
      return describe("verifies the get pet operation", function() {
        beforeEach(function() {
          window.body = null;
          window.response = null;
          window.callback = null;
          window.error = null;
          window.success_callback = function(data) {
            return window.response = data;
          };
          return window.error_callback = function(data) {
            return window.error = data;
          };
        });
        it("verifies the response messages from the get operation", function() {
          var operation, responseMessages;
          operation = swagger.pet.operations.getPetById;
          console.log(operation);
          responseMessages = operation.responseMessages;
          expect(responseMessages).toBeDefined;
          expect(responseMessages.length).toBe(2);
          expect(responseMessages[0].code).toBe(400);
          return expect(responseMessages[1].code).toBe(404);
        });
        it("gets help() from the get pet operation", function() {
          var operation;
          operation = swagger.pet.operations.getPetById;
          return expect(operation.help()).toBe("* petId (required) - ID of pet that needs to be fetched");
        });
        it("verifies the get pet operation", function() {
          var operation, param, parameters;
          operation = swagger.pet.operations.getPetById;
          expect(operation.method).toBe("get");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(1);
          param = parameters[0];
          expect(param.name).toBe("petId");
          expect(param.type).toBe("integer");
          expect(param.paramType).toBe("path");
          return expect(param.description).toBeDefined;
        });
        it("verifies the post pet operation", function() {
          var operation, param, parameters;
          operation = swagger.pet.operations.addPet;
          expect(operation.method).toBe("post");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(1);
          param = parameters[0];
          expect(param.name).toBe("body");
          expect(param.type).toBe("Pet");
          expect(param.paramType).toBe("body");
          return expect(param.description).toBeDefined;
        });
        it("verifies the put pet operation", function() {
          var operation, param, parameters;
          operation = swagger.pet.operations.updatePet;
          expect(operation.method).toBe("put");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(1);
          param = parameters[0];
          expect(param.name).toBe("body");
          expect(param.type).toBe("Pet");
          expect(param.paramType).toBe("body");
          return expect(param.description).toBeDefined;
        });
        it("verifies the findByTags operation", function() {
          var operation, param, parameters;
          operation = swagger.pet.operations.findPetsByTags;
          expect(operation.method).toBe("get");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(1);
          param = parameters[0];
          console.log(param);
          expect(param.name).toBe("tags");
          expect(param.type).toBe("string");
          expect(param.paramType).toBe("query");
          return expect(param.description).toBeDefined;
        });
        it("verifies the patch pet operation", function() {
          var operation, param, parameters, produces;
          operation = swagger.pet.operations.partialUpdate;
          expect(operation.method).toBe("patch");
          produces = operation.produces;
          expect(produces.length).toBe(2);
          expect(produces[0]).toBe("application/json");
          expect(produces[1]).toBe("application/xml");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(2);
          param = parameters[0];
          expect(param.name).toBe("petId");
          expect(param.type).toBe("string");
          expect(param.paramType).toBe("path");
          expect(param.description).toBeDefined;
          param = parameters[1];
          expect(param.name).toBe("body");
          expect(param.type).toBe("Pet");
          expect(param.paramType).toBe("body");
          return expect(param.description).toBeDefined;
        });
        it("verifies the post pet operation with form", function() {
          var consumes, operation, param, parameters;
          operation = swagger.pet.operations.updatePetWithForm;
          expect(operation.method).toBe("post");
          consumes = operation.consumes;
          expect(consumes.length).toBe(1);
          expect(consumes[0]).toBe("application/x-www-form-urlencoded");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(3);
          param = parameters[0];
          expect(param.name).toBe("petId");
          expect(param.type).toBe("string");
          expect(param.paramType).toBe("path");
          expect(param.description).toBeDefined;
          param = parameters[1];
          expect(param.name).toBe("name");
          expect(param.type).toBe("string");
          expect(param.paramType).toBe("form");
          expect(param.description).toBeDefined;
          expect(param.required).toBe(false);
          param = parameters[2];
          expect(param.name).toBe("status");
          expect(param.type).toBe("string");
          expect(param.paramType).toBe("form");
          expect(param.description).toBeDefined;
          return expect(param.required).toBe(false);
        });
        it("verifies a file upload", function() {
          var consumes, operation, param, parameters;
          operation = swagger.pet.operations.uploadFile;
          expect(operation.method).toBe("post");
          consumes = operation.consumes;
          expect(consumes.length).toBe(1);
          expect(consumes[0]).toBe("multipart/form-data");
          parameters = operation.parameters;
          expect(parameters).toBeDefined;
          expect(parameters.length).toBe(2);
          param = parameters[0];
          expect(param.name).toBe("additionalMetadata");
          expect(param.type).toBe("string");
          expect(param.paramType).toBe("form");
          expect(param.required).toBe(false);
          expect(param.description).toBeDefined;
          param = parameters[1];
          expect(param.name).toBe("file");
          expect(param.type).toBe("File");
          expect(param.paramType).toBe("body");
          expect(param.description).toBeDefined;
          return expect(param.required).toBe(false);
        });
        return it("gets help() from the file upload operation", function() {
          var operation;
          operation = swagger.pet.operations.uploadFile;
          return expect(operation.help().trim()).toBe("* additionalMetadata - Additional data to pass to server\n* file - file to upload");
        });
      });
    });
  
  }).call(this);
  