Testing validators compatibility with JSON-Schema standard
The table shows the number of failing tests in different groups:
- spec - tests from the "official" JSON-Schema-Test-Suite (
format
and other optional tests are excluded) - schemas - tests with schemas from different validators test-suites
- keywords - additional tests for standard keywords used by Ajv (
format
tests are excluded) - issues - Ajv tests for various issues, primarily $ref resolution
The table header shows the total number of tests is each group.
validator | spec (272) |
schemas (32) |
keywords (33) |
issues (103) |
total (443) |
---|---|---|---|---|---|
ajv | - | - | - | - | - |
jayschema | 5 | - | - | 6 | 11 |
jsonschema | 2 | 2 | - | 10 | 14 |
tv4 | 2 | 1 | - | 11 | 14 |
z-schema | - | 1 | - | 17 | 18 |
is-my-json-valid | 7 | - | - | 13 | 20 |
jjv | 9 | 2 | 1 | 12 | 24 |
skeemas | 2 | 4 | 1 | 23 | 30 |
jsen | - | - | - | 44 | 44 |
djv | 4 | 9 | 2 | 49 | 64 |
themis | 13 | - | 4 | 55 | 72 |
jsck | 17 | 15 | - | 49 | 81 |
schemasaurus | 19 | 19 | 2 | 71 | 111 |
x
marks the validators that failed the test.
Test file | ajv | djv | imjv1 | jay2 | jjv | jsck | jsen | js3 | ss4 | sk5 | th6 | tv4 | zs7 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
base URI change | x | x | x | x | x | x | x | x | x | x | x | x | |
mutually recursive ref | x | x | x | x | x | x | x | x | x | ||||
ref in remote ref with id | x | x | x | x | x | x | x | x | |||||
id in ref without root id | x | x | x | x | x | x | x | x | |||||
root ref in remote ref | x | x | x | x | x | x | x | x | |||||
recursive refs | x | x | x | x | x | x | x | x | |||||
swagger schema | x | x | x | x | x | x | x | x | |||||
spec/refRemote | x | x | x | x | x | x | |||||||
ref when sibling property has id | x | x | x | x | x | ||||||||
recursive hash in remote hash | x | x | x | x | x | ||||||||
spec/ref | x | x | x | x | x | ||||||||
Total failing | - | 7 | 7 | 4 | 8 | 10 | 7 | 3 | 11 | 6 | 9 | 5 | 5 |
5 skeemas
6 themis
7 z-schema
Tests require node v6 to run.
npm install
git submodule update --init
# all tests with all validators
npm test
# one group of tests for all validators
# groups: spec, schemas, keywords, issues
npm test spec
# all tests for one validator
mocha test/ajv