Methods are no longer bound to Ajv instances (#232).
compileAsync
method returns Promise and supports async loading of meta-schemas (#249, #334).
Errors are logged using console.warn
and console.error
(#265).
If async option is not specified, es7 native async functions are used as the primary option (if available)(#338), see Asynchronous validation.
Option defaults changed (see Options):
- extendRefs:
"fail"
- fail schema compilation (#294). - sourceCode:
false
- do not store source code of validation functions (#309). - unknownFormats:
true
- fail schema compilation (#324).
Defaults in version 4.x.x:
{
extendRefs: true,
sourceCode: true,
unknownFormats: 'ignore'
}