gavel

Gavel HTTP validator JavaScript library

GAVEL—JavaScript library for HTTP validation

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;
});
npm install gavel
$ 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