tv4
tv4 copied to clipboard
Tiny Validator for JSON Schema v4
If I understand correctly, `$ref` replaces the whole schema, not merges with things inside the schema object? So you cannot do `{title: 'foobar', $ref: '#/properties/foobar'}` and have `title` be kept?...
This is slight convoluted, but I need to validate a json document which is itself a json schema. I am therefore validating it using tv4 against the json schema meta-schema...
Hi, so l have an external schema file called definitions.json which contains all reusable schemas. The problem is that when **nesting** the `$ref` to this schema, nothing happens except true...
I just noticed that this was by design, based on the `tv4.missing` demo. Is that in the spec? It seems backwards to me -- I want missing reference definitions to...
Optionally track schema assignment - could replace banUnknownProperties code, by post-run search. [This module](https://www.npmjs.org/package/json-model) already has this functionality, so matching that API would be good.
Hello, If you try the following code: var mongo=require("mongodb"); var tv4=require("tv4"); var schema={ type:"object", _id :new mongo.ObjectID("54ffea1b9c34d42046c45d0a"), properties:{ value:{ "type":["string"] } ``` } ``` } var doc={ value:"a" } console.log(JSON.stringify(schema));...
When using tv4 to validate a string containing "@" never returns. Test conditions: Schema definition: id: {type: "string", pattern: "^((https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]_)_\/?)$"} String to validate against this pattern http://www.test.com/test/[email protected]/public ValidateMultiple/ValidateResult hangs...
Hi bellow is the example: { title: "Name", type: "String", minLength: 4, maxLength: 6 messages: { minLength: "Your name must be at least "dynamic value" characters long.", maxLengh: "Your name...
When running tv4 against the official JSON-schema test suite, running the tests: - `change resolution scope, changed scope ref valid` - `change resolution scope, changed scope ref invalid` has side-effects...
I've been investigating JSON-schema validators. And contributing to the benchmarks at the JSON-schema validators `themis`and `JSCK`. According to the benchmarks included in both `themis` and `JSCK`. tv4 is slow. And...