Skip to content

Commit

Permalink
docs: clarify behaviour of addVocabulary (#2454)
Browse files Browse the repository at this point in the history
As it's name is so different and not just `addKeywords`, there has been some confusion as to it's behaviour.
  • Loading branch information
jasoniangreen authored Jun 16, 2024
1 parent 85dafb0 commit 8bccdc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/strict-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ By default Ajv fails schema compilation when unknown keywords are used. Users ca
ajv.addKeyword("allowedKeyword")
```

or
or use the convenience method `addVocabulary` for multiple keywords

```javascript
ajv.addVocabulary(["allowed1", "allowed2"])
ajv.addVocabulary(["allowed1", "allowed2"]) // simply calls addKeyword multiple times
```

#### Ignored "additionalItems" keyword
Expand Down

0 comments on commit 8bccdc4

Please sign in to comment.