ajv
8.20.0 · 24 Apr 2026MIT544M / weekRepositoryHomepagenpmAtom feed
8.20.0 is the newest release of 8.x.
In short
3 breaking3 new
- Breaking
dataPathproperty replaced withinstancePath - Breaking
"should" replaced with "must" in the messages
- Breaking
Property name is removed from "propertyName" keyword error message (it is still available in
error.params.propertyName).
Security
1 advisory affects 8.0.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
This document describes changes from v7.2.4 to v8.0.0.
If you are migrating from v6 you can use this document.
New features
Support JSON Schema draft-2020-12: prefixItems keyword and changed semantics of items keyword, dynamic recursive references.
OpenAPI discriminator keyword.
Improved JSON Type Definition support:
Errors consistent with JTD specification.
Error objects with additional properties to simplify error handling (see Error objects)
Internationalized error messages with ajv-i18n
TypeScript: support type unions in JSONSchemaType
Other changes / improvements
Node.js require works without .default property - see examples in Getting started
Reduce runtime dependency for standalone validation code
Fix resolution of $ref: "#" when $id is present (#815)
Breaking changes
Option strict controls all strict mode restrictions
JSON Schema validation errors changes:
- Breaking
dataPathproperty replaced withinstancePath - Breaking
"should" replaced with "must" in the messages
- Breaking
Property name is removed from "propertyName" keyword error message (it is still available in
error.params.propertyName).
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.