Skip to content

Commit 8bccdc4

Browse files
docs: clarify behaviour of addVocabulary (#2454)
As it's name is so different and not just `addKeywords`, there has been some confusion as to it's behaviour.
1 parent 85dafb0 commit 8bccdc4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/strict-mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ By default Ajv fails schema compilation when unknown keywords are used. Users ca
4242
ajv.addKeyword("allowedKeyword")
4343
```
4444

45-
or
45+
or use the convenience method `addVocabulary` for multiple keywords
4646

4747
```javascript
48-
ajv.addVocabulary(["allowed1", "allowed2"])
48+
ajv.addVocabulary(["allowed1", "allowed2"]) // simply calls addKeyword multiple times
4949
```
5050

5151
#### Ignored "additionalItems" keyword

0 commit comments

Comments
 (0)