Skip to content

Commit

Permalink
docs: add option to the example using json-schema-secure schema (ajv-…
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin authored and andriyl committed Jun 16, 2021
1 parent d84d979 commit 5565759
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Some keywords in JSON Schemas can lead to very slow validation for certain data.
You can validate your JSON schemas against [this meta-schema](../lib/refs/json-schema-secure.json) to check that these recommendations are followed:

```javascript
ajv = new Ajv({strictTypes: false}) // this option is required for this schema
const isSchemaSecure = ajv.compile(require("ajv/lib/refs/json-schema-secure.json"))

const schema1 = {format: "email"}
Expand Down

0 comments on commit 5565759

Please sign in to comment.