You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Ajv version 7.0.0-beta.0](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) is released with these changes:
19
+
20
+
- to reduce the mistakes in JSON schemas and unexpected validation results, [strict mode](./docs/strict-mode.md) is added - it prohibits ignored or ambiguous JSON Schema elements.
21
+
- to make code injection from untrusted schemas impossible, [code generation](./docs/codegen.md) is fully re-written to be safe.
22
+
- to simplify Ajv extensions, the new keyword API that is used by pre-defined keywords is available to user-defined keywords - it is much easier to define any keywords now, especially with subschemas.
23
+
- schemas are compiled to ES6 code (ES5 code generation is supported with an option).
24
+
- to improve reliability and maintainability the code is migrated to TypeScript.
25
+
26
+
**Please note**:
27
+
28
+
- the support for JSON-Schema draft-04 is removed - if you have schemas using "id" attributes you have to replace them with "\$id" (or continue using version 6 that will be supported until 02/28/2021).
29
+
- all formats are separated to ajv-formats package - they have to be explicitely added if you use them.
30
+
31
+
See [release notes](https://github.com/ajv-validator/ajv/releases/tag/v7.0.0-beta.0) for the details.
32
+
33
+
To install the new version:
34
+
35
+
```bash
36
+
npm install ajv@beta
37
+
```
38
+
39
+
See [Getting started with v7](https://github.com/ajv-validator/ajv/tree/v7-beta#usage) for code example.
0 commit comments