Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
Readme.md
request_async_api.feature
request_sync_api.feature
response_async_api.feature
response_sync_api.feature

Readme.md

GAVEL—JavaScript library for HTTP validation

Build Status Dependency Status devDependency Status Coverage Status

Gavel logo

Usage

var gavel = require('gavel');
response = {
  "statusCode": "200",
  "headers": {
    "content-type": "application/json",
    "date": "Wed, 03 Jul 2013 13:30:53 GMT",
    "server": "gunicorn/0.17.4",
    "content-length": "30",
    "connection": "keep-alive"
  },
  "body": "{\n  \"origin\": \"94.113.241.2\"\n}"
};
expected = {
  "statusCode": "200",
  "headers": {
    "content-type": "application/json",
    "date": "Wed, 03 Jul 2013 13:30:53 GMT",
    "server": "gunicorn/0.17.4",
    "content-length": "30",
    "connection": "keep-alive"
  },
  "body": "{\n  \"origin\": \"94.113.241.2\"\n}"
};
gavel.isValid(response, expected, 'response', function(error,result){
  console.log result;
});

Installation

npm install gavel

Resources

Development

$ git clone git@github.com:apiaryio/gavel.js.git
$ cd gavel.js
$ git submodule init
$ git submodule update
$ npm install
$ npm test

Codo API documentation is published with use of Github post-receive hook

This README.md is generated by build script in [./scripts/build] from Gavel's Cucumber documentation repository

Something went wrong with that request. Please try again.