github ajv-validator/ajv v7.2.0

latest releases: v8.13.0, v8.12.0, v8.11.2...
3 years ago

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 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 utility type to convert your JTD schema type into the type of data (@erikbrinkman, #1458) - see this example

Other improvements by @Fdawgs (#1466), @t7yang (#1472, #1473), @koba04 (#1460)

Don't miss a new ajv release

NewReleases is sending notifications on new releases.