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
Different default import using require (breaking change):
Separate Ajv class with JSON Schema draft-2019-09 support and Ajv class without any keywords/meta-schemas:
import Ajv from "ajv" // draft-07 support
import AjvCore from "ajv/dist/core" // no keywords included
import Ajv2019 from "ajv/dist/2019" // draft-2019-09 support (option `draft2019: true` no longer used)
Different default import using require (breaking change):
const Ajv = require("ajv").default // draft-07 support
const AjvCore = require("ajv/dist/core").default // no keywords included
const Ajv2019 = require("ajv/dist/2019").default // draft-2019-09 support
Support for $data reference with in draft-2019-09
JSON Schema draft-2019-09 support with option draft2019:
One column per quarter.
JSON Schema draft-2019-09 support with option draft2019:
Added the new keywords from draft 2019-09:
Added the new keywords from draft 2019-09:
unevaluatedProperties and unevaluatedItems (require option unevaluated to be supported). Please note that an additional generated code may be added to track evaluated properties, even if these keywords are not used).dependentProperties and dependentSchemas (require option next to be supported). These keywords replaced dependencies that is still supported though for draft-7 compatibility.maxContains and minContains (require option next to be supported). See docs and examples herePrevent optimiser from removing assignments with side effects when (for user keywords that modify data and have valid: true option)
valid: true option)See v7.0.0-beta.0 for changes from v6.
See v7.0.0-beta.0 for changes from v6.
Switched to syntax tree for code generation.
Added code optimizations:
These optimizations reduce the size of generated code by more than 10% (based on the tests), removing over 16% of statements in compiled code.
Option code.optimize to control optimization - one optimization pass by default.
See Code optimization for more details.
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 Ajv v6.
The current latest beta version is v7.0.0-beta.4 - see the releases beta.1-beta.4 in addition to the below.
Please note:
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
Pre-release of Ajv v7-beta version that is due end of September.
Pre-release of Ajv v7-beta version that is due end of September.
Unless you want to experiment with the new version, it is recommended to continue using v6 until the following releases with proper release notes.
This release is needed to update related package(s).
Nothing published for this version
Nothing published for this version
Fix performance issue of "url" format.
Fix performance issue of "url" format.
Fix uri scheme validation (@ChALkeR). Fix boolean schemas with strictKeywords option
Fix uri scheme validation (@ChALkeR). Fix boolean schemas with strictKeywords option (#1270)
Fix: coercion of one-item arrays to scalar that should fail validation (failing example).
Fix: coercion of one-item arrays to scalar that should fail validation (failing example).
…vulnerability related to untrusted schemas (CVE-2020-15366)
Pass schema object to processCode function Option for strictNumbers (@issacgerges, #1128) Fixed vulnerability related to untrusted schemas (CVE-2020-15366)
Nothing published for this version
Nothing published for this version
Improved hostname validation (@sambauers, #1143) Option keywords to add custom keywords (@franciscomorais, #1137) Types fixes (@boenrobot, @MattiAsted
Improved hostname validation (@sambauers, #1143)
Option keywords to add custom keywords (@franciscomorais, #1137)
Types fixes (@boenrobot, @MattiAstedrone)
Docs:
Time formats support two digit and colon-less variants of timezone offset (#1061 , @cjpillsbury) Docs: RegExp related security considerations Tests: D
Time formats support two digit and colon-less variants of timezone offset (#1061 , @cjpillsbury) Docs: RegExp related security considerations Tests: Disabled failing typescript test
Fix: the unknown keywords were ignored with the option strictKeywords: true (instead of failing compilation) in some sub-schemas (e.g. anyOf), when th
Fix: the unknown keywords were ignored with the option strictKeywords: true (instead of failing compilation) in some sub-schemas (e.g. anyOf), when the sub-schema didn't have known keywords.
Fix types Fix addSchema (#1001) Update dependencies
Fix types Fix addSchema (#1001) Update dependencies
Option strictDefaults to report ignored defaults (#957, @not-an-aardvark) Option strictKeywords to report unknown keywords
Option strictDefaults to report ignored defaults (#957, @not-an-aardvark)
Option strictKeywords to report unknown keywords (#781)
Nothing published for this version
Nothing published for this version
OpenAPI keyword nullable can be any boolean (and not only true). Custom keyword definition changes:
OpenAPI keyword nullable can be any boolean (and not only true).
Custom keyword definition changes:
dependencies option in to require the presence of keywords in the same schema.Nothing published for this version
Docs: security considerations. Meta-schema for the security assessment of JSON Schemas.
Docs: security considerations. Meta-schema for the security assessment of JSON Schemas.
Option useDefaults: "empty" to replace null and "" (empty strings) with default values (in addition to assigning defaults to missing and undefined pro
Option useDefaults: "empty" to replace null and "" (empty strings) with default values (in addition to assigning defaults to missing and undefined properties).
Update draft-04 meta-schema to remove incorrect usage of "uri" format.
Nothing published for this version
Nothing published for this version
Keyword "nullable" from OpenAPI spec Replaced phantomjs with headless chrome
Keyword "nullable" from OpenAPI spec Replaced phantomjs with headless chrome
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
With option passContext, the context is now passed in recursive/mutually recursive refs (@cvlab, #768).
With option passContext, the context is now passed in recursive/mutually recursive refs (@cvlab, #768).
Support URNs in $id - core url package is replaced with `url-js` (#423, @sondrele).
Support URNs in $id - core url package is replaced with url-js (#423, @sondrele).
Typescript declarations updated to use PromiseLike (#717, @krenor)
Typescript declarations updated to use PromiseLike (#717, @krenor)
Nothing published for this version
Parameter allowedValue in the error of const keyword (#713, @marshall007).
Parameter allowedValue in the error of const keyword (#713, @marshall007).
Nothing published for this version
A different error message for additionalProperties error with errorDataPath: 'property' option (#671, @lehni)
A different error message for additionalProperties error with errorDataPath: 'property' option (#671, @lehni)
Nothing published for this version
Removed deprecated patternGroups keyword
Changes from v5.5.2
draft-07 support:
if/then/else keywords$comment keywordSchema IDs
$id keyword is used as schema ID by default.schemaId option should be set to "id" or "auto" for id keyword to be used.
See Options.Formats
date, date-time, time: support leap year and leap secondjson-pointer: only validates a string format of JSON pointerjson-pointer-uri-fragment: to validate uri-fragment format of JSON pointerKeyword changes
uniqueItems keyword to validate an array of same-type scalars in one passuniqueItems and contains are validated after items and type coercion (with coerceTypes option)oneOf keywordpatternGroups keywordexamples, readOnly, writeOnly, contentEncoding, contentMediaType.Other
then/else keywords.$comment to log/pass to a function strings from $comment keyword.Only $id keyword is used as schema ID by default. schemaId option should be set to "id" or "auto" for id keyword to be used. See Options.
Only $id keyword is used as schema ID by default.
schemaId option should be set to "id" or "auto" for id keyword to be used.
See Options.
Changes from v5.4.0 and v5.5.0. Defaults are now assigned inside schemas of then/else keywords. Removed deprecated patternGroups keyword and v5 meta-s…
Option $comment to log/pass to a function strings from draft-07 $comment keywords. Removed nodent bundle, ajv-async bundle includes nodent now. Reserv
Option $comment to log/pass to a function strings from draft-07 $comment keywords.
Removed nodent bundle, ajv-async bundle includes nodent now.
Reserved annotation keywords: examples, readOnly, writeOnly, contentEncoding, contentMediaType.
Nothing published for this version
default meta-schema is draft-07
draft-07 support:
if/then/else keywords$comment keyword (reserved)Formats:
date, date-time, time: support leap year and leap secondjson-pointer: only validates a string format of JSON pointerjson-pointer-uri-fragment: to validate uri-fragment format of JSON pointerKeyword changes
uniqueItems keyword to validate an array of same-type scalars in a single passuniqueItems and contains are validated after items and type coercion (with coerceTypes option)oneOf keywordOther
Nothing published for this version
Nothing published for this version
Support chaining of methods add* and remove* (#625, @pithu), see Api.
Support chaining of methods add* and remove* (#625, @pithu), see Api.
Option logger to disable logging or to specify a custom logger (#618, @meirotstein).
Option logger to disable logging or to specify a custom logger (#618, @meirotstein).
Replace json-stable-stringify with a faster fork without jsonify.
Replace json-stable-stringify with a faster fork without jsonify.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Refactor: separate "equal" into package fast-deep-equal
Refactor: separate "equal" into package fast-deep-equal
Your coding agent can read these notes before it upgrades. Set up the MCP server →