Code Monkey home page Code Monkey logo

gavel.js's Introduction

npm version Known Vulnerabilities


Gavel logo

Gavel

Gavel tells you whether an actual HTTP message is valid against an expected HTTP message.

Install

npm install gavel

Usage

CLI

# (Optional) Record HTTP messages
curl -s --trace - http://httpbin.org/ip | curl-trace-parser > expected
curl -s --trace - http://httpbin.org/ip | curl-trace-parser > actual

# Perform the validation
cat actual | gavel expected

Gavel CLI is not supported on Windows. Example above uses curl-trace-parser.

NodeJS

const gavel = require('gavel');

// Define HTTP messages
const expected = {
  statusCode: 200,
  headers: {
    'Content-Type': 'application/json'
  }
};

const actual = {
  statusCode: 404,
  headers: {
    'Content-Type': 'application/json'
  }
};

// Perform the validation
const result = gavel.validate(expected, actual);

The code above would return the following validation result:

{
  valid: false,
  fields: {
    statusCode: {
      valid: false,
      kind: 'text',
      values: {
        expected: '200',
        actual: '404'
      },
      errors: [
        {
          message: `Expected status code '200', but got '404'.`
        }
      ]
    },
    headers: {
      valid: true,
      kind: 'json',
      values: {
        expected: {
          'Content-Type': 'application/json'
        },
        actual: {
          'Content-Type': 'application/json'
        }
      },
      errors: []
    }
  }
}

Usage with JSON Schema

When a parsable JSON body is expected without an explicit schema the default schema is inferred.

You can describe the body expectations using JSON Schema by providing a valid schema to the bodySchema property of the expected HTTP message:

const gavel = require('gavel');

const expected = {
  bodySchema: {
    type: 'object',
    properties: {
      fruits: {
        type: 'array',
        items: {
          type: 'string'
        }
      }
    }
  }
};

const actual = {
  body: JSON.stringify({
    fruits: ['apple', 'banana', 2]
  })
};

const result = gavel.validate(expected, actual);

The validation result against the given JSON Schema will look as follows:

{
  valid: false,
  fields: {
    body: {
      valid: false,
      kind: 'json',
      values: {
        actual: "{\"fruits\":[\"apple\",\"banana\",2]}"
      },
      errors: [
        {
          message: `At '/fruits/2' Invalid type: number (expected string)`,
          location: {
            pointer: '/fruits/2'
          }
        }
      ]
    }
  }
}

Supported JSON Schema versions

Examples

Take a look at the Gherkin specification, which describes on examples how validation of each field behaves:

Type definitions

Gavel ships with TypeScript type definitions. Please refer to the definitions file for more details.

API

  • validate(expected: HttpMessage, actual: HttpMessage): ValidationResult

License

MIT

gavel.js's People

Contributors

abacaphiliac avatar abtris avatar almad avatar artem-zakharchenko avatar dependabot-preview[bot] avatar dependabot[bot] avatar dkder3k avatar greenkeeper[bot] avatar honzajavorek avatar jesperronn avatar joaosa avatar kuba-kubula avatar marcelogo avatar miiila avatar mikaa123 avatar pksunkara avatar w-vi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gavel.js's Issues

Decaffeinate the codebase

The decaffeination allows for further development and removal of several CoffeeScript-specific dependencies. If the tests stay intact, the decaffeination can happen also by rewriting the code from scratch instead of using decaffeinate:

  1. support dual codebase, with both coffeescript and javascript
  2. keep tests in coffeescript, rewrite code into javascript with the tests passing
  3. once everything is in javascript and passing, rewrite tests to be in javascript
  4. remove coffeescript from the project

Related to apiaryio/dredd#705 and the Get Gavel.js back into shape milestone.

Install fails in restricted network environment (proxied npm registry)

Cannot install gavel (as a dependency of dredd) because the jsonlint dependency:
https://github.com/apiaryio/gavel.js/blob/master/package.json#L33

Please see this NPM post on how to ameliorate this issue:
http://blog.npmjs.org/post/145724408060/dealing-with-problematic-dependencies-in-a

It’s usually a good idea to open an issue on the project with the Git dependency, politely asking the maintainers to replace the Git dependency, if possible. Generally, we discourage using Git dependencies in package.json, and it’s typically only used temporarily while a maintainer waits for an upstream fix to be applied and published.

Stack trace exceeded for fairly small payloads

This script



gavel  = require 'gavel'

assert = require 'assert'

response =
    statusCode: 200
    body: """
[
    {"id": 1, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 2, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 3, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 4, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 5, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 6, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 7, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 8, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 9, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 10, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 11, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 12, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 13, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 14, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 15, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 16, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 17, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 18, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 19, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 20, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 21, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 22, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 23, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 24, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"},
    {"id": 25, "a": "a", "bool": true, "b": "b", "c": "c", "d": "d", "e": "e"}
]
    """

gavel.validate response, response, 'response', (err, result) ->
    assert.equal err, null
    assert.equal result, true

will fail. result variable will contain

{ headers: 
   { length: 0,
     amandaErrors: { length: 0, errorMessages: {} },
     now: '1380048955873',
     dataError: null },
  body: 
   { '0': 
      { property: [],
        attributeValue: true,
        message: 'Validator internal error: Maximum call stack size exceeded',
        validatorName: 'error' },
     length: 1,
     amandaErrors: { '0': [Object], length: 1, errorMessages: {} },
     now: '1380048955900',
     dataError: null },
  statusCode: true }

almad@namtar /tmp $ node -v
v0.8.19
almad@namtar /tmp $ uname -a
Linux namtar 3.8.13-gentoo #2 SMP PREEMPT Sun Jun 2 16:26:50 CEST 2013 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux

Gavel.js should print an invalid media type

Given API Blueprint like this:

+ Response 200 (image)

Gavel throws an error that the media type is invalid. It would be nice if the error message contains the actual value. Instead of:

TypeError: invalid media type

there would be:

TypeError: invalid media type 'image'

Gavel doesn't support $ref in schemas

Gavel uses Amanda for validating payloads against a JSON Schema. Unfortunately Amanda doesn't support $ref in schemas, and doesn't look like it will be added any time soon (see this issue from two years ago).

This is a feature I would like to have in Gavel. It seems to me that the options are:

Deprecate and kill async API

According to the documentation, gavel.js offers an async API to perform validation and other operations.

According to the code, this is not an async API but a wrapper that is blocking the event loop anyway.

This is bad and harmful as people thinks that the validation is non blocking (so I do not get worried about giant payloads as is off process), while at the end of the day it is.

Please deprecate and kill this API as soon as possible.

Introduce semantic release

As part of apiaryio/dredd#438, I'd like to introduce semantic release to Gavel since it's a convenient way how to maintain a project.

Steps:

  • Migrate changelog to GitHub Releases
  • Make the repository commitizen-friendly
  • Introduce Semantic Releasing

Remove Codo docs

I propose to remove the Codo documentation entirely and improve regular documentation in form of prose (Cucumber, Markdown, whatever works best).

Coffeedoc is down for a long time

See https://github.com/coffeedoc/coffeedoc.info. Gavel's API docs are non-existent due to that at the moment and will be non-existent also in the future if we don't move the docs somewhere else.

screen shot 2016-08-02 at 16 19 13

### Codo docs are not useful

For Gavel user or developer, Codo docs are not useful. Even manually generated, it's a bunch of HTML files with randomly interlinked CoffeeScript classes. Occasionally there are comments for methods generated from code, but those have three up to five words and reading the actual code would be usually much more useful.

Upgrading Cucumber to anything above 1.0.0 crashes the test suite

If Cucumber is upgraded to anything above 1.0.0, it crashes the test suite:

...
And each result entry under "results" key must contain "message" key

(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.
...
(node) warning: Recursive process.nextTick detected. This will break in the next version of node. Please use setImmediate for recursive deferral.

RangeError: Maximum call stack size exceeded

Couldn't find exactly why this happens. (Node 0.10) Filed also cucumber/cucumber-js#602.

$ref schemas should not allow referencing non-schema assets

I think it's okay to support referencing external files in Gavel, but we really need to test that it will interpret only valid JSON Schema files, not files like /etc/passwd (would disclose sensitive data), /dev/zero (can eat all memory), etc. People run Dredd on their CIs, we need to prevent any vulnerabilities. Following tests should be added:

  • when referencing external file with valid content, Gavel reads the file and correctly validates according to the schema
  • when referencing external file with (possibly sensitive) plain text content, Gavel refuses to read the file and doesn't disclose the file's contents
  • when referencing huge or infinitely large external file (not sure how to test this on Windows very well), Gavel refuses to read the file and doesn't eat all computer memory or doesn't crash

Hide in-development features from documentation view

It is really hard to see which features are documentation and which are in-progress.

It would be nice to have those that are in development hidden by default, or releasing documentation with release containing only working resources.

Also see #12

Are optional keys in schema supported?

This is a repost from API Blueprint (apiaryio/api-blueprint#53), but they've pointed my question in the direction of Gavel, so here goes.

Does 1A support required/optional flags in schema specifications?

My specification is:

## Entities [/api/entities]
+ Model

    + Body

        ```
        {
            "entities": [
                {
                    "id": "entity1",
                    "name": "Entity"
                }
            ],
            "total": 1
        }
        ```

    + Schema

        ```
        {
            "title": "Entities Schema",
            "type": "object",
            "properties": {
                "entities": {
                    "type": "array",
                    "items": {
                        "required": ["id"]
                    }
                },
                "total": {
                    "type": "integer"
                }
            }
        }
        ```

Trying to validate this response with Dredd, and it says that name is required and is missing. I've validated the schema against http://json-schema-validator.herokuapp.com/ and it's all clear, leading me to suspect that it's how I've written the schema.

Thanks in advance.

Cleanup scripts

Package scripts have multiple issues:

  • They're not accessible from package.json, which is a modern way how to add scripts to a JavaScript project.
  • There are many unnecessary scripts, some are probably never used by anyone.
  • All of the current scripts are bash-based, which makes the whole project untestable on Windows.

JSON schema to result comparison not catching changes to key name.

I'm new to Dredd so I may be doing it wrong. I was having issues getting an invalid key name to fail in dredd until I changed line 231 in gavel/lib/validators/json-schema.js: (173 in json-schema.coffee)

Old: result = tv4.validateMultiple(this.data, this.schema);
New: result = tv4.validateMultiple(this.data, this.schema, true, true);

Schema Expected:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "properties": {
    "enable": {
        "type": "boolean",
        "description": "True if login button should be enabled, false is disabled."
    },
    "message": {
        "type": "string",
        "description": "Alert message to be rendered in alert field."
    }
}

Passing Result from server (deliberately intended to fail but doesn't without patch)

{
  "enXXXXable": true,
  "message": "Some Message Here."
}

Apib file excerpt:

### GetAlerts [POST /Mobile/GetAlerts]

+ Request (application/json)
    + Attributes
        + appver: 1.0 (string) - Current app version
        + platform: Google Android (required,string) - Operating Sysetm
        + platformversion: 4.1.2 (required,string) - Operating Sysetm version

+ Response 200 (application/json)
    + Attributes
        + enable: true (boolean) - True if login button should be enabled, false is disabled.
        + message: Some Message Here (string)

Node: 4.4.3
Dredd: 1.1.0-pre.0
Gavel: 0.5.2

Gavel doesn't seem to be able to validate JSON Schema primitive types

It looks like following doesn't work with Gavel. Schema:

{"type": "string"}

Value:

"hello"

Or schema:

{"type": "number"}

Value:

123

It seems to fail with following:

Can't validate real media type 'text/plain' against expected media type 'application/schema+json'.

This is problem mainly when validating descriptions written in Swagger, which is heavily schema-based and people are supposed to specify even primitive values by schemas like this. This blocks apiaryio/dredd#1094, because following won't work for binary data:

paths:
  /binary:
    get:
      responses:
        200:
          description: Representation
          examples:
            "application/octet-stream": ""
          schema:
            type: string
            format: binary

Using JsonSchema

I'm having trouble using JsonSchema : when i use the validate method, gavel seems to check for body identity : how can i only validate the schema ?
Is there a reason why the gavelmain module doesn't export JsonSchema?

Many thanks for your help.

Handle +json content types

After fixing #16 I found out that some content-types can be JSON parseable and validatable with JSON validator and Gavel should take them into the game. e.g. application/hal+json or vnd.apiblueprint.ast.raw+json; version=1.0

text validator error

in case of come spec. data on input fails on (observed with big html input )

URIError: URI malformed
at encodeURI (native)
at [object Object].diff_match_patch.patch_obj.toString (/home/towdie/Data/work/apiary/node_modules/googlediff/javascript/diff_match_patch_uncompressed.js:2180:24)
at Array.join (native)
at diff_match_patch.patch_toText (/home/towdie/Data/work/apiary/node_modules/googlediff/javascript/diff_match_patch_uncompressed.js:2044:15)
at TextDiff.validate (/home/towdie/Data/work/apiary/node_modules/gavel/lib/validators/text-diff.js:32:30)
at HttpResponse.validatable.runBodyValidator (/home/towdie/Data/work/apiary/node_modules/gavel/lib/mixins/validatable-http-message.js:273:55)

Flaky test: Cucumber CLI scenarios

During Cucumber feature testing there are two CLI scenarios that are flaky. Both seem to timeout randomly, and I cannot draw a clear conclusion what causes scenarios timeout.

1) Scenario: Read and validate real raw HTTP message from STDIN - node_modules/gavel-spec/features/cli.feature:18
   Step: Then exit status is 0 - node_modules/gavel-spec/features/cli.feature:24
   Step Definition: test/cucumber/step_definitions/cli_stepdefs.js:30
   Message:
     function timed out after 5000 milliseconds
2) Scenario: Exit status for invalid message - node_modules/gavel-spec/features/cli.feature:27
   Step: Then exit status is 1 - node_modules/gavel-spec/features/cli.feature:39
   Step Definition: test/cucumber/step_definitions/cli_stepdefs.js:30
   Message:
     function timed out after 5000 milliseconds

See the TravisCI job

Mentioned scenarios must be reviewed, rewritten (if necessary), and stabilized.

NaN type

getting "No validator found for real data media type "NaN" and expected data media type "NaN"". error in results when "Unknown real body media type. Content-type header is "application/json" but body is not a parseble JSON."

Consider not using `git+https`

Commit 68c08ea introduced fetching a npm package via https+git, which servers with older versions of git do not support.

see comment 68c08ea#commitcomment-29333973

For machines not able to update Git, this change blocks usage of Gavel and who depend on it. Most notably Dredd

I found this problem on a machine with Git 2.1.2:

$ git --version
git version 2.1.2
$ git ls-remote -h -t https://[email protected]/josdejong/jsonlint.git
fatal: Unable to find remote helper for 'https'

Question is if you can see problems by reverting that line of code to the old version:

Suggestion:

-    "jsonlint": "git+https://[email protected]/josdejong/jsonlint.git",
+    "jsonlint": "josdejong/jsonlint",	

I would think this will preserve functionality as-is

Rewrite test coverage collector

Rewrite existing test coverage collector script operating with CoffeeScript to the JavaScript version. Preferably, use native mocha output and coveralls anlyzis.

Original coverage implementation commented in 5e4441a

Gavel throws error when it expects an array as a root level object but finds an object instead

I am testing an API that responds with an object, but I expect it to have an array as the root element.

I get the following error from gavel when validating an api response:

ERROR: TypeError: Object  has no method 'map'
    at Function.compile (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/node_modules/json-pointer/index.js:184:28)
    at /Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/validators/json-example.js:60:32
    at Array.forEach (native)
    at Function.JsonExample.evaluateOutputToResults (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/validators/json-example.js:54:15)
    at HttpResponse.validatable.setBodyResults (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/mixins/validatable-http-message.js:283:32)
    at HttpResponse.validatable.validateBody (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/mixins/validatable-http-message.js:131:17)
    at HttpResponse.validatable.validate (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/mixins/validatable-http-message.js:20:12)
    at HttpResponse.validatable.isValid (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/mixins/validatable-http-message.js:43:12)
    at proxy (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/validate.js:13:39)
    at Object.isValid (/Users/evan/Git/localmed-api-spec/node_modules/dredd/node_modules/gavel/lib/validate.js:32:10)

This happens in json-example.js on line 58 when calling jsonPointer.compile.

I suspect this is because item['property'] is empty in this scenario.

Expected

[
  {
    "id": "us_33602",
    "slug": "aetna-a16e80a",
    "uri": "/insurance/us_33602/",
    "name": "Aetna",
    "issuerCode": "33602",
    "state": "TX"
  }
]

Actual

{
  "count":0,
  "next":null,
  "previous":null,
  "insurance_issuers":[]
}

The item object at the time of the error:

{
    "property": "",
    "propertyValue": {
        "count": 0,
        "next": null,
        "previous": null,
        "insurance_issuers": []
    },
    "attributeName": "type",
    "attributeValue": "array",
    "message": "The  property must be an array (current value is {\"count\":0,\"next\":null,\"previous\":null,\"insurance_issuers\":[]}).",
    "validator": "type",
    "validatorName": "type",
    "validatorValue": "array"
}

Reopen #26

Hi,

I'd like to re-open issue #26 but I cannot. However, I ran into it today, and figured out the cause (after much hair pulling). Can you assist?

Thanks!

gavel 0.2.7 install throws checksum error

With the latest gavel published to npm I'm getting checksum errors when I attempt to install:

npm install gavel
npm http GET https://registry.npmjs.org/gavel
npm http 200 https://registry.npmjs.org/gavel
npm http GET https://registry.npmjs.org/gavel/-/gavel-0.2.7.tgz
npm http 200 https://registry.npmjs.org/gavel/-/gavel-0.2.7.tgz
npm ERR! Error: shasum check failed for /var/folders/nr/w_7b0xvd1zs91hhgd9gkch_w0001bs/T/npm-65279-oLUZ1mNH/1387465822956-0.6278377042617649/tmp.tgz
npm ERR! Expected: d71d11dae8137d3ecbe59653261a784050a6632a
npm ERR! Actual:   110e19626484ea0ad18b345b8eb8bff6bf9727ff

I ran an npm cache clear just to make sure it wasn't something local. I can install gavel 0.2.6 without issue. Note that this affects dredd as well because the devDependencies are fuzzy so installing dredd attempts to install gavel 0.2.7.

Confusing Repo Names

Since the npm package is called "gavel", I expected apiaryio/gavel to refer to the npm package.

It's sort of an unspoken convention to either name your node project node-<project name> or just <project name>.

Just for clarity (I was really scratching my head, digging through the other repo looking for the code!) I'd suggest renaming the other repo to something like gavel-spec (since it's essentially just a spec/docs) and this one to gavel.

Meanwhile, at the top of each repos' README, provide a link to the other repo (since there might be outdated links on external websites).

A minor nitpick, I know. Just a thought!

non valid json causes error

https://papertrailapp.com/systems/apiary/events?r=323825502379114502-323825564656099348

error: lib/datamodel: GAVEL_VALIDATION_ERROR : TypeError: Object.keys called on non-object
Oct 07 12:53:58 apiary app/web.2: at Function.keys (native)
Oct 07 12:53:58 apiary app/web.2: at SchemaGenerator.getSchemaForObject (/app/node_modules/gavel/lib/utils/schema-generator.js:112:43)
Oct 07 12:53:58 apiary app/web.2: at SchemaGenerator.getSchemaForObject (/app/node_modules/gavel/lib/utils/schema-generator.js:122:47)
Oct 07 12:53:58 apiary app/web.2: at SchemaGenerator.getSchemaForObject (/app/node_modules/gavel/lib/utils/schema-generator.js:122:47)
Oct 07 12:53:58 apiary app/web.2: at SchemaGenerator.getSchemaForObject (/app/node_modules/gavel/lib/utils/schema-generator.js:122:47)
Oct 07 12:53:58 apiary app/web.2: at SchemaGenerator.generate (/app/node_modules/gavel/lib/utils/schema-generator.js:50:31)
Oct 07 12:53:58 apiary app/web.2: at JsonExample.getSchema (/app/node_modules/gavel/lib/validators/json-example.js:81:28)
Oct 07 12:53:58 apiary app/web.2: at new JsonExample (/app/node_modules/gavel/lib/validators/json-example.js:28:24)
Oct 07 12:53:58 apiary app/web.2: at HttpResponse.validatable.runBodyValidator (/app/node_modules/gavel/lib/mixins/validatable-http-message.js:272:19)
Oct 07 12:53:58 apiary app/web.2: at HttpResponse.validatable.validateBody (/app/node_modules/gavel/lib/mixins/validatable-http-message.js:130:10)
Oct 07 12:53:58 apiary app/web.2: at HttpResponse.validatable.validate (/app/node_modules/gavel/lib/mixins/validatable-http-message.js:20:12)
Oct 07 12:53:58 apiary app/web.2: at HttpResponse.validatable.isValid (/app/node_modules/gavel/lib/mixins/validatable-http-message.js:43:12)
Oct 07 12:53:58 apiary app/web.2: at setValidations (/app/lib/datamodel.coffee:1148:37, :1742:38)
Oct 07 12:53:58 apiary app/web.2: at transformValidationResult (/app/lib/datamodel.coffee:1216:5, :1813:7)
Oct 07 12:53:58 apiary app/web.2: at model.trafficSchema.methods.getHtmlDiff.Gavel2Html (/app/lib/datamodel.coffee:1223:10, :1824:12)
Oct 07 12:53:58 apiary app/web.2: at VirtualType.applyGetters (/app/node_modules/mongoose/lib/virtualtype.js:77:25)
Oct 07 12:53:58 apiary app/web.2: at model.Document.get (/app/node_modules/mongoose/lib/document.js:700:18)
Oct 07 12:53:58 apiary app/web.2: at applyGetters (/app/node_modules/mongoose/lib/document.js:1519:35)
Oct 07 12:53:58 apiary app/web.2: at model.Document.toObject (/app/node_modules/mongoose/lib/document.js:1468:5)
Oct 07 12:53:58 apiary app/web.2: at Promise.exports.Controller.MockController.mockRequest (/app/lib/mocks.coffee:908:51, :1169:22)
Oct 07 12:53:58 apiary app/web.2: at Promise.onResolve (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:162:8)
Oct 07 12:53:58 apiary app/web.2: at Promise.EventEmitter.emit (events.js:99:17)
Oct 07 12:53:58 apiary app/web.2: at Promise.emit (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:79:38)
Oct 07 12:53:58 apiary app/web.2: at Promise.fulfill (/app/node_modules/mongoose/node_modules/mpromise/lib/promise.js:92:20)
Oct 07 12:53:58 apiary app/web.2: at handleSave (/app/node_modules/mongoose/lib/model.js:130:13)
Oct 07 12:53:58 apiary app/web.2: at exports.tick (/app/node_modules/mongoose/lib/utils.js:414:16)
Oct 07 12:53:58 apiary app/web.2: at /app/node_modules/mongodb/lib/mongodb/collection.js:497:9
Oct 07 12:53:58 apiary app/web.2: at Server.Base._callHandler (/app/node_modules/mongodb/lib/mongodb/connection/base.js:382:41)
Oct 07 12:53:58 apiary app/web.2: at Server.connect.connectionPool.on.server._serverState (/app/node_modules/mongodb/lib/mongodb/connection/server.js:472:18)
Oct 07 12:53:58 apiary app/web.2: at [object Object].MongoReply.parseBody (/app/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
Oct 07 12:53:58 apiary app/web.2: at [object Object].Server.connect.connectionPool.on.server._serverState (/app/node_modules/mongodb/lib/mongodb/connection/server.js:430:20)
Oct 07 12:53:58 apiary app/web.2: at [object Object].EventEmitter.emit (events.js:96:17)
Oct 07 12:53:58 apiary app/web.2: at [object Object]._connect (/app/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:191:13)
Oct 07 12:53:58 apiary app/web.2: at [object Object].EventEmitter.emit (events.js:99:17)
Oct 07 12:53:58 apiary app/web.2: at Socket.exports.Connection.createDataHandler (/app/node_modules/mongodb/lib/mongodb/connection/connection.js:384:22)
Oct 07 12:53:58 apiary app/web.2: at Socket.EventEmitter.emit (events.js:96:17)
Oct 07 12:53:58 apiary app/web.2: at TCP.onread (net.js:397:14)

Introduce AppVeyor

AppVeyor is a CI for testing projects on Windows. We want to make sure Gavel is Windows-compatible as it's one of possible blockers for apiaryio/dredd#204.

Note: It's not possible to close this issue without #72 being done.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.