Skip to content

Commit e9c884f

Browse files
committed
add draft 7, but let's not make it default yet, as a lot of validators fail a LOT of tests. Is something wrong with the draft7 testrun
1 parent 20ad8d2 commit e9c884f

38 files changed

+51640
-1997
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,20 @@ for validators that cause side-effects on schema or data. The top 6 validators t
88

99
# Performance
1010

11-
![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|djv|@cfworker/json-schema|jsonschema&chd=t:100,69.8,49.8,12.6,4.2,1.1)
11+
![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|djv|@cfworker/json-schema|jsonschema&chd=t:100,69.2,51.5,13.1,5.1,1.2)
1212

1313
|Validator|Relative speed|Number of test runs per second|
1414
|---------|:------------:|:----------------------------:|
15-
|[`ajv`](https://github.com/ajv-validator/ajv)|100%|17743 (± 0.42%)|
16-
|[`@exodus/schemasafe`](https://github.com/ExodusMovement/schemasafe)|69.8%|12383 (± 0.35%)|
17-
|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid#readme)|49.8%|8840 (± 0.27%)|
18-
|[`djv`](https://github.com/korzio/djv#readme)|12.6%|2239 (± 1.4%)|
19-
|[`@cfworker/json-schema`](https://github.com/cfworker/cfworker/tree/master/packages/json-schema/README.md)|4.2%|753 (± 1%)|
20-
|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|1.1%|197 (± 1.22%)|
15+
|[`ajv`](https://github.com/ajv-validator/ajv)|100%|17000 (± 0.34%)|
16+
|[`@exodus/schemasafe`](https://github.com/ExodusMovement/schemasafe)|69.2%|11760 (± 0.89%)|
17+
|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid#readme)|51.5%|8757 (± 0.37%)|
18+
|[`djv`](https://github.com/korzio/djv#readme)|13.1%|2223 (± 1.24%)|
19+
|[`@cfworker/json-schema`](https://github.com/cfworker/cfworker/tree/master/packages/json-schema/README.md)|5.1%|865 (± 1.15%)|
20+
|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|1.2%|198 (± 1.11%)|
2121

2222
884 tests are run in each test run.
2323

24-
Validators tested: [`@exodus/schemasafe (1.0.0-rc.3)`](https://github.com/ExodusMovement/schemasafe), [`@cfworker/json-schema (1.6.3)`](https://github.com/cfworker/cfworker/tree/master/packages/json-schema/README.md), [`ajv (6.12.6)`](https://github.com/ajv-validator/ajv), [`jsonschema (1.4.0)`](https://github.com/tdegrunt/jsonschema#readme), [`djv (2.1.3-alpha.0)`](https://github.com/korzio/djv#readme), [`is-my-json-valid (2.20.5)`](https://github.com/mafintosh/is-my-json-valid#readme), [`json-schema-library (4.1.4)`](https://github.com/sagold/json-schema-library), [`jsen (0.6.6)`](https://github.com/bugventure/jsen), [`tv4 (1.3.0)`](https://github.com/geraintluff/tv4), [`z-schema (5.0.0)`](https://github.com/zaggino/z-schema), [`jjv (1.0.2)`](https://github.com/acornejo/jjv), [`jassi (0.1.2)`](https://github.com/iclanzan/jassi), [`themis (1.1.6)`](https://github.com/playlyfe/themis), [`request-validator (0.3.3)`](https://github.com/bugventure/request-validator), [`json-schema-validator-generator (1.1.11)`](https://github.com/danwang/json-schema-validator-generator), [`jsck (0.3.2)`](https://github.com/pandastrike/jsck#readme), [`JSV (4.0.2)`](http://github.com/garycourt/JSV), [`json-model (0.2.24)`](https://github.com/geraintluff/json-model), [`skeemas (1.2.5)`](https://github.com/Prestaul/skeemas#readme), [`schemasaurus (0.7.8)`](https://github.com/AlexeyGrishin/schemasaurus), [`json-gate (0.8.23)`](https://github.com/oferei/json-gate#readme), [`revalidator (0.3.1)`](https://github.com/flatiron/revalidator),
24+
Validators tested: [`@exodus/schemasafe (1.0.0-rc.3)`](https://github.com/ExodusMovement/schemasafe), [`@cfworker/json-schema (1.6.3)`](https://github.com/cfworker/cfworker/tree/master/packages/json-schema/README.md), [`ajv (6.12.6)`](https://github.com/ajv-validator/ajv), [`jsonschema (1.4.0)`](https://github.com/tdegrunt/jsonschema#readme), [`djv (2.1.3-alpha.0)`](https://github.com/korzio/djv#readme), [`is-my-json-valid (2.20.5)`](https://github.com/mafintosh/is-my-json-valid#readme), [`json-schema-library (4.1.4)`](https://github.com/sagold/json-schema-library), [`jsen (0.6.6)`](https://github.com/bugventure/jsen), [`tv4 (1.3.0)`](https://github.com/geraintluff/tv4), [`z-schema (5.0.0)`](https://github.com/zaggino/z-schema), [`jjv (1.0.2)`](https://github.com/acornejo/jjv), [`jassi (0.1.2)`](https://github.com/iclanzan/jassi), [`themis (1.1.6)`](https://github.com/playlyfe/themis), [`request-validator (0.3.3)`](https://github.com/bugventure/request-validator), [`json-schema-validator-generator (1.1.11)`](https://github.com/danwang/json-schema-validator-generator), [`json-model (0.2.24)`](https://github.com/geraintluff/json-model), [`jsck (0.3.2)`](https://github.com/pandastrike/jsck#readme), [`JSV (4.0.2)`](http://github.com/garycourt/JSV), [`skeemas (1.2.5)`](https://github.com/Prestaul/skeemas#readme), [`schemasaurus (0.7.8)`](https://github.com/AlexeyGrishin/schemasaurus), [`json-gate (0.8.23)`](https://github.com/oferei/json-gate#readme), [`revalidator (0.3.1)`](https://github.com/flatiron/revalidator),
2525

2626
(validators not in the results above where excluded because of failing tests - see below for details)
2727

@@ -33,7 +33,7 @@ This test suite uses the [official JSON-schema test suite](https://github.com/js
3333

3434
If a validator does not pass a test in the official test suite, it will show up in these results.
3535

36-
![failing tests](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=14,4,1&chs=600x416&chxl=-1:|@exodus/schemasafe|@cfworker/json-schema|ajv|jsonschema|djv|is-my-json-valid|json-schema-library|jsen|tv4|z-schema|jjv|jassi|themis|request-validator|json-schema-validator-generator|jsck|JSV|json-model|skeemas|schemasaurus|json-gate|revalidator&chd=t:8,9,10,33,99,111,140,141,155,169,171,172,189,207,216,227,234,234,235,237,342,384&chxr=0,0,384&chds=0,384)
36+
![failing tests](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=14,4,1&chs=600x416&chxl=-1:|@exodus/schemasafe|@cfworker/json-schema|ajv|jsonschema|djv|is-my-json-valid|json-schema-library|jsen|tv4|z-schema|jjv|jassi|themis|request-validator|json-schema-validator-generator|json-model|jsck|JSV|skeemas|schemasaurus|json-gate|revalidator&chd=t:8,9,10,33,99,111,140,141,155,169,171,172,189,207,216,225,227,234,235,237,342,384&chxr=0,0,384&chds=0,384)
3737

3838
|Validator|Number of failing tests (click for details)|
3939
|---------|-----------------------|
@@ -52,9 +52,9 @@ If a validator does not pass a test in the official test suite, it will show up
5252
|[`themis`](https://github.com/playlyfe/themis)|[189](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/themis.md)|
5353
|[`request-validator`](https://github.com/bugventure/request-validator)|[207](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/request-validator.md)|
5454
|[`json-schema-validator-generator`](https://github.com/danwang/json-schema-validator-generator)|[216](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/json-schema-validator-generator.md)|
55+
|[`json-model`](https://github.com/geraintluff/json-model)|[225](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/json-model.md)|
5556
|[`jsck`](https://github.com/pandastrike/jsck#readme)|[227](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/jsck.md)|
5657
|[`JSV`](http://github.com/garycourt/JSV)|[234](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/JSV.md)|
57-
|[`json-model`](https://github.com/geraintluff/json-model)|[234](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/json-model.md)|
5858
|[`skeemas`](https://github.com/Prestaul/skeemas#readme)|[235](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/skeemas.md)|
5959
|[`schemasaurus`](https://github.com/AlexeyGrishin/schemasaurus)|[237](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/schemasaurus.md)|
6060
|[`json-gate`](https://github.com/oferei/json-gate#readme)|[342](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/json-gate.md)|
@@ -69,13 +69,14 @@ Number of tests that caused side-effects. The schema or data was altered by the
6969

7070
|Validator|Number of side-effects (BAD)|
7171
|---------|----------------------------|
72-
|[`json-model`](https://github.com/geraintluff/json-model)|[816](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/json-model-side-effects.md)|
7372
|[`revalidator`](https://github.com/flatiron/revalidator)|[818](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/revalidator-side-effects.md)|
73+
|[`json-model`](https://github.com/geraintluff/json-model)|[833](https://github.com/ebdrup/json-schema-benchmark/blob/master/reports/json-model-side-effects.md)|
7474

7575
Validators not in the list have no side-effects on data or schemas.
7676

7777
# Tests for other JSON-schema versions
7878

79+
- [draft7](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft7)
7980
- [draft6](https://github.com/ebdrup/json-schema-benchmark/)
8081
- [draft4](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft4)
8182

README.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ Validators not in the list have no side-effects on data or schemas.
5555

5656
# Tests for other JSON-schema versions
5757

58+
- [draft7](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft7)
5859
- [draft6](https://github.com/ebdrup/json-schema-benchmark/)
5960
- [draft4](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft4)
6061

File renamed without changes.
File renamed without changes.

draft4/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ for validators that cause side-effects on schema or data. The top 6 validators t
88

99
# Performance
1010

11-
![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|z-schema|@cfworker/json-schema|jsonschema&chd=t:100,67.5,43,6.2,5,1.1)
11+
![performance](https://chart.googleapis.com/chart?chxt=x,y&cht=bhs&chco=76A4FB&chls=2.0&chbh=62,4,1&chs=600x416&chxl=-1:|ajv|@exodus/schemasafe|is-my-json-valid|z-schema|@cfworker/json-schema|jsonschema&chd=t:100,70.2,46.9,6.5,5.3,1.2)
1212

1313
|Validator|Relative speed|Number of test runs per second|
1414
|---------|:------------:|:----------------------------:|
15-
|[`ajv`](https://github.com/ajv-validator/ajv)|100%|192500.91%)|
16-
|[`@exodus/schemasafe`](https://github.com/ExodusMovement/schemasafe)|67.5%|129981.04%)|
17-
|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid#readme)|43%|82680.49%)|
18-
|[`z-schema`](https://github.com/zaggino/z-schema)|6.2%|11871.53%)|
19-
|[`@cfworker/json-schema`](https://github.com/cfworker/cfworker/tree/master/packages/json-schema/README.md)|5%|9620.8%)|
20-
|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|1.1%|2171.22%)|
15+
|[`ajv`](https://github.com/ajv-validator/ajv)|100%|184341.13%)|
16+
|[`@exodus/schemasafe`](https://github.com/ExodusMovement/schemasafe)|70.2%|129373.11%)|
17+
|[`is-my-json-valid`](https://github.com/mafintosh/is-my-json-valid#readme)|46.9%|86431.25%)|
18+
|[`z-schema`](https://github.com/zaggino/z-schema)|6.5%|12070.55%)|
19+
|[`@cfworker/json-schema`](https://github.com/cfworker/cfworker/tree/master/packages/json-schema/README.md)|5.3%|9821.64%)|
20+
|[`jsonschema`](https://github.com/tdegrunt/jsonschema#readme)|1.2%|2270.35%)|
2121

2222
692 tests are run in each test run.
2323

@@ -77,6 +77,7 @@ Validators not in the list have no side-effects on data or schemas.
7777

7878
# Tests for other JSON-schema versions
7979

80+
- [draft7](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft7)
8081
- [draft6](https://github.com/ebdrup/json-schema-benchmark/)
8182
- [draft4](https://github.com/ebdrup/json-schema-benchmark/tree/master/draft4)
8283

0 commit comments

Comments
 (0)