ajv
8.20.0 · 24 Apr 2026MIT544M / weekRepositoryHomepagenpmAtom feed
7.2.4 is the newest release of 7.x.
In short
2 changed
Security
1 advisory affects 7.2.0; 8.18.0 fixes them
- Moderateajv has ReDoS when using `$data` optionGHSA-2g4f-4pwh-qvx6 · 11 Feb 2026Fixed in 8.18.0
Release note
strictRequired option (off by default) - to log or fail if properties used in JSON Schema "required" are not defined in "properties" (@PBug90, #1403)
Compiled parsers (as fast as JSON.parse on valid JSON, but replace validation and fail much faster on invalid JSON) and serializers (10x+ faster than JSON.stringify) from JSON Type Definition schemas (#1454) - see examples in javascript and typescript
Please note: there are fixes to compiled parsers in 7.2.1
The website migrated to VuePress and documentation is restructured to make navigating Ajv documentation and learning easier - this is still work in progress, but already some improvement on the information structure. Any feedback/corrections would be very much appreciated!
Improved TypeScript support for JSONSchemaType:
JTDSchemaType<T> utility type to convert your data type into the type of JTD schema, to simplify its writing and to make sure it is consistent with your data type, with type inference support for ajv methods (@erikbrinkman, #1446, #1456, #1457, #1475) - see example here
Alternatively, you can use JTDDataType<typeof schema> utility type to convert your JTD schema type into the type of data (@erikbrinkman, #1458) - see this example
Other improvements
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.