Skip to content

Commit

Permalink
docs: add option to the example using json-schema-secure schema (#1373)
Browse files Browse the repository at this point in the history
  • Loading branch information
epoberezkin committed Jan 2, 2021
1 parent 4de9bfb commit 9200e92
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions docs/security.md
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 9200e92

Please sign in to comment.