NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #23 most downloaded on npm
Another JSON Schema Validator
Last release 5 months ago
24 Apr 2026
Ships unpredictably
gaps range from 8 days to 1.6 years
Most releases are documented
notes for 50 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
359 releases · first in 2015
fix: add support for node 22/24, drop node 16/21 by @jasoniangreen in #2580
Full Changelog: v8.19.0...v8.20.0
fix(pattern): use configured RegExp engine with $data keyword to mitigate ReDoS attacks ( CVE-2025-69873 ) by @epoberezkin in #2586
"sideEffects": false to package.json by @josdejong in #2480Full Changelog: v8.17.1...v8.18.0
One column per quarter.
bump version to 8.17.1 by @jasoniangreen in #2472
Full Changelog: v8.17.0...v8.17.1
The only functional change is to switch from uri-js (which is no longer supported), to fast-uri. This is the second attempt and the team on fast-uri have been really helpful addressing the issues we found last time.
Revert "Revert fast-uri change (#2444)" by @gurgunday in #2448
fix: ignore new eslint error for @typescript-eslint/no-extraneous-class by @jasoniangreen in #2455
docs: clarify behaviour of addVocabulary by @jasoniangreen in #2454
docs: refactor to improve legibility by @blottn in #2432
Fix grammatical typo in managing-schemas.md by @wetneb in #2305
docs: Fix broken strict-mode link by @alexanderjsx in #2459
feat: add test for encoded refs and bump fast-uri by @jasoniangreen in #2449
fix: changes for @typescript-eslint/array-type rule by @jasoniangreen in #2467
fixes #2217 - clarify custom keyword naming by @jasoniangreen in #2457
Revert fast-uri change by @jasoniangreen in #2444
Replace uri-js with fast-uri by @vixalien in #2415
uri-js with fast-uri by @vixalien in #2415Full Changelog: v8.14.0...v8.15.0
readme: build badge by @epoberezkin in #2424
Full Changelog: v8.13.0...v8.14.0
- add named exports - update dependencies - update node.js
fix JTD serialisation (remove leading comma in objects with only optional properties) (#2190, @piliugin-anton)
Export ValidationError and MissingRefError
Update dependencies
Export ValidationError and MissingRefError (https://github.com/ajv-validator/ajv/pull/1840, @dannyb648)
Export ValidationError and MissingRefError (#1840, @dannyb648)
Update dependencies
Export ValidationError and MissingRefError (#1840, @dannyb648)
Use root schemaEnv when resolving references in oneOf (#1901, @asprouse)
Use root schemaEnv when resolving references in oneOf (#1901, @asprouse)
Only use equal function in generated code when it is used (#1922, @bhvngt)
uriResolver option (@zekth, #1862)
uriResolver option (@zekth, #1862)
Option code.esm to generate ESM exports for standalone validation functions (@rehanvdm, #1861) Support discriminator keyword with $ref in oneOf subsch
Option code.esm to generate ESM exports for standalone validation functions (@rehanvdm, #1861)
Support discriminator keyword with $ref in oneOf subschemas (@dfeufel, #1815)
Use full RegExp string (with flags) as cache key, related to https://github.com/ajv-validator/ajv-keywords/issues/220
Use full RegExp string (with flags) as cache key, related to https://github.com/ajv-validator/ajv-keywords/issues/220
Nothing published for this version
Fix browser bundles in cdnjs regExp option allowing to specify alternative RegExp engine, e.g. re2 (@efebarlas)
Fix browser bundles in cdnjs
regExp option allowing to specify alternative RegExp engine, e.g. re2 (@efebarlas)
Publish Ajv bundle for JSON Schema 2020-12 to cdnjs.com
Publish Ajv bundle for JSON Schema 2020-12 to cdnjs.com
Update JSON Schema Test Suite. Change minContains: 0 now correctly allows empty array.
Update JSON Schema Test Suite.
Change minContains: 0 now correctly allows empty array.
Fix $ref resolution for schemas without $id (@rbuckton, #1725) Support standalone module import from ESM modules without using .default property (@bhv
Fix $ref resolution for schemas without $id (@rbuckton, #1725)
Support standalone module import from ESM modules without using .default property (@bhvngt, #1757)
Update code for breaking TS change - error in catch has type unknown (#1760)
Nothing published for this version
Fix "not" keyword preventing validation of "allOf" and some other keywords
Fix "not" keyword preventing validation of "allOf" and some other keywords (#1668)
Track evaluated properties with patternProperties that have always valid schemas (e.g., true) (@P0lip, #1626) Option `int32range` to disable number ra
Track evaluated properties with patternProperties that have always valid schemas (e.g., true) (@P0lip, #1626)
Option int32range to disable number range checking for int32 and uint32 type in JTD schemas
Optimize validation code for const keyword with scalar values (@SoAsEr, #1561) Add option schemaId to support ajv-draft-04 - Ajv for JSON Schema drat-
Optimize validation code for const keyword with scalar values (@SoAsEr, #1561)
Add option schemaId to support ajv-draft-04 - Ajv for JSON Schema drat-04.
JSON Type Definition schema options:
JSON Type Definition schema options:
timestamp type as Date objects.timestamp type.better error reporting for JSONSchemaType in case strictNullChecks option is disabled (@erikbrinkman, #1583)
Typescript improvements:
Add JTDDataType to compile signature (@erikbrinkman, #1547) Improve JSONSchemaType for records (@erikbrinkman, #1564) Use rollup for browser bundles (
Add JTDDataType to compile signature (@erikbrinkman, #1547) Improve JSONSchemaType for records (@erikbrinkman, #1564) Use rollup for browser bundles (@realityking, #1533) Docs corrections
unicodeRegExp option to not use RegExp unicode flag that may be incompatible with some environments (@asaid-0, #1530) Fix JSONSchemaType (@erikbrinkma
unicodeRegExp option to not use RegExp unicode flag that may be incompatible with some environments (@asaid-0, #1530) Fix JSONSchemaType (@erikbrinkman, #1541) Extended error message for invalid keyword values (@pcwiek, #1542)
Fix: add source code back to npm package, 8.0.4 is breaking ajv-cli (and possibly other things)
Fix: add source code back to npm package, 8.0.4 is breaking ajv-cli (and possibly other things)
Nothing published for this version
Improve JSONSchemaType errors (@erikbrinkman, #1525)
Improve JSONSchemaType errors (@erikbrinkman, #1525)
Support RegExp formats in standalone code (#1470) Add schema path to strictTuple error message (@asaid-0, #1519)
Support RegExp formats in standalone code (#1470) Add schema path to strictTuple error message (@asaid-0, #1519)
Typescript: export function getData (for ajv-errors)
Typescript: export function getData (for ajv-errors)
This document describes changes from v7.2.4 to v8.0.0.
This document describes changes from v7.2.4 to v8.0.0.
If you are migrating from v6 you can use this document.
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:
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)
Option strict controls all strict mode restrictions JSON Schema validation errors changes:
dataPath property replaced with instancePatherror.params.propertyName).Revert the change for strict mode options in v8.0.0-beta.1 to allow overrides to disable some options, not only to enable.
Revert the change for strict mode options in v8.0.0-beta.1 to allow overrides to disable some options, not only to enable.
These strict mode options are available:
strictSchema - new, equivalent to strict: true in v7, default true
strictNumbers - reinstated from v6, but with default true
strictTypes - same as in v7, default "log"
strictTuples - same as in v7, default "log"
strictTuples - same as in v7, default false
Option strict sets all options above to the same value.
JSON Schema draft2012-12 support - prefixItems, new semantics of items, dynamicRef and dynamicAnchor
JSON Schema draft2012-12 support - prefixItems, new semantics of items, dynamicRef and dynamicAnchor
Fixes:
$ref: "#" with $id in subschemaownProperties: true optionNothing published for this version
Support for union types in JSONSchemaType (#1302, @erikbrinkman). More ergonomic Ajv constructor export - no need to use .default in .js and .mjs file
Support for union types in JSONSchemaType (#1302, @erikbrinkman).
More ergonomic Ajv constructor export - no need to use .default in .js and .mjs files (#1381).
Remove circular dependencies (#1399).
New syntax for strict option (#1392). It can now be used as boolean/"log" (to set all strict mode restrictions) or as an object with properties schema, number, types, tuples and required, the defaults are:
{
schema: true,
number: true,
types: "log",
tuples: "log",
required: false
}
Options strictTypes, strictTuples and strictRequired removed.
schemaPath and instancePath are consistent with JSON Type Definition RFC
JTD error objects:
schemaPath and instancePath are consistent with JSON Type Definition RFCkeyword and params, message (can be removed with messages: false option) to error objects
JTD error messages can be translated with ajv-i18n v4.0.0-beta.0JTDErrorObject type.JSON Schema errors:
dataPath property replaced with instancePath (update in your code!)error.params.propertyName).Fix #1515: correctly initialize evaluated properties.
Fix #1515: correctly initialize evaluated properties.
Nothing published for this version
Docs correction Simplified JSONSchemaType (@erikbrinkman) Fix #1493 - incorrect reporting of missing required property with option ownProperties: true
Docs correction
Simplified JSONSchemaType (@erikbrinkman)
Fix #1493 - incorrect reporting of missing required property with option ownProperties: true
Fix #1501 - JTD not working correctly with many properties in the schema
It is a breaking change for compiled parsers compared with 7.2.0 that was released earlier on the same day.
Add tests and fix parsers compiled with ajv.compileParser from JTD schemas:
Compiled parsers are now:
It is a breaking change for compiled parsers compared with 7.2.0 that was released earlier on the same day.
strictRequired option (off by default) - to log or fail if properties used in JSON Schema "required" are not defined in "properties" (@PBug90, #1403)
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:
Other improvements by @Fdawgs (#1466), @t7yang (#1472, #1473), @koba04 (#1460)
Support readonly arrays with JSONSchemaType (@LinusU, #1447)
Support readonly arrays with JSONSchemaType (@LinusU, #1447)
Support for JSON Type Definition RFC 8927 - a simple schema language provided as an alternative to JSON Schema.
Support for JSON Type Definition RFC 8927 - a simple schema language provided as an alternative to JSON Schema.
See these docs:
Allow ":" in keyword names (#1421, @teq0)
Fix: duplicate functions in standalone validation code with mutually recursive schemas (#1361) Fix: reference resolution when base URI change was not
Fix: duplicate functions in standalone validation code with mutually recursive schemas (#1361) Fix: reference resolution when base URI change was not applied (#1414)
oneOf error type (#1368, @G-Rath)
Fixes:
Docs:
Remove duplicate functions from standalone validation code
Remove duplicate functions from standalone validation code (#1361)
Update error message for maxLength/minLength keywords
Update error message for maxLength/minLength keywords
addKeyword - keyword name should be passed as property in definition object, not as the first parameter (old API works with "deprecated" warning). Als…
Please note: this document covers the changes from v6.12.6.
unevaluatedProperties and unevaluatedItems, dynamic recursive references and other additional keywords.Please note:
new keyword, as Ajv is now ES6 class.post: true in keyword definition.compile and compileAsync now return type-guards - see Getting started.validate is a type-guard.new keyword (it is ES6 class).loopRequiredkeywords - now expects the array of keyword definitions (old API works with "deprecated" warning)validateFormats: false can be used instead, old format mode can be chosen via ajv-formats package.nullable keyword is supported by default.jsPropertySyntax: true (deprecated) can be used if old format is needed.ignoreKeywordsWithRef (deprecated) can be used instead to ignore $ref siblings.code: {process: (code, schemaEnv: object) => string}.code: {source: true}.strict.ajv.addFormat or formats option.Nothing published for this version
Nothing published for this version
Publish browser bundles to ajv-dist
Publish browser bundles to ajv-dist
Improve standalone code generation. Update JSON Schema tests. Code components doc for contributors.
Improve standalone code generation. Update JSON Schema tests. Code components doc for contributors.
Better types of error objects Remove esModuleInterop from typescript config
Better types of error objects Remove esModuleInterop from typescript config
Support code generation options code.es5 and code.lines for standalone validation code.
Support code generation options code.es5 and code.lines for standalone validation code.
JSONSchemaType support for the new draft-2019-09 keywords.
JSONSchemaType support for the new draft-2019-09 keywords.
Support for generation of standalone validation code
Support for generation of standalone validation code
Compatible with ajv-errors v2-beta. Keywords for all data types that are executed after others (with post: true in keyword definition).
Compatible with ajv-errors v2-beta.
Keywords for all data types that are executed after others (with post: true in keyword definition).
Add "latest" meta-schema URI "http://json-schema.org/schema" to draft-2019-09 class to reference default meta-schema (to support ajv-keywords)
Add "latest" meta-schema URI "http://json-schema.org/schema" to draft-2019-09 class to reference default meta-schema (to support ajv-keywords)
Your coding agent can read these notes before it upgrades. Set up the MCP server →