This repository was archived by the owner on Mar 19, 2019. It is now read-only.

Description
Given the following code:
var JSONSchema = require('json-schema');
var instance = {
a:1,
b:2
};
var schema = {
type: 'object',
properties: {
a: { type: 'number' }
},
additionalProperties: false
};
var result = JSONSchema.validate(instance, schema);
console.log(result);
The output is:
{ valid: false,
errors:
[ { property: '',
message: 'numberThe property b is not defined in the schema and the schema does not allow additional properties' } ] }
I would have expected:
{ valid: false,
errors:
[ { property: 'b',
message: 'The property b is not defined in the schema and the schema does not allow additional properties' } ] }
My environment:
$ node --version
v0.8.7
$ npm ls
json-schema-test
└── json-schema@0.2.2