Skip to content

Releases: ajv-validator/ajv

v8.1.0

11 Apr 16:47
Compare
Choose a tag to compare

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)

v8.0.5

02 Apr 15:49
Compare
Choose a tag to compare

Fix: add source code back to npm package, 8.0.4 is breaking ajv-cli (and possibly other things)

v8.0.4

02 Apr 12:49
Compare
Choose a tag to compare

Reduce npm bundle size

v8.0.3

01 Apr 07:00
Compare
Choose a tag to compare

Improve JSONSchemaType errors (@erikbrinkman, #1525)

v8.0.2

31 Mar 07:55
Compare
Choose a tag to compare

Support RegExp formats in standalone code (#1470)
Add schema path to strictTuple error message (@asaid-0, #1519)

v8.0.1

27 Mar 22:43
Compare
Choose a tag to compare

Typescript: export function getData (for ajv-errors)

v8.0.0

27 Mar 12:39
Compare
Choose a tag to compare

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:

  • dataPath property replaced with instancePath
  • "should" replaced with "must" in the messages
  • property name is removed from "propertyName" keyword error message (it is still available in error.params.propertyName).

v7.2.4

26 Mar 08:15
Compare
Choose a tag to compare

Fix #1515: correctly initialize evaluated properties.

v8.0.0-beta.4

23 Mar 07:55
Compare
Choose a tag to compare
v8.0.0-beta.4 Pre-release
Pre-release

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.

v8.0.0-beta.3

21 Mar 18:40
Compare
Choose a tag to compare
v8.0.0-beta.3 Pre-release
Pre-release

JSON Schema draft2012-12 support - prefixItems, new semantics of items, dynamicRef and dynamicAnchor

Fixes:

  • #815 - incorrect resolution of $ref: "#" with $id in subschema
  • #1493 - incorrect error message for missing property with ownProperties: true option
  • #1501 - incorrect compilation of JTD schema with many properties in the schema