From 8bccdc4d7c46c1a8e0dacc1c4e1cd317c20b3fe5 Mon Sep 17 00:00:00 2001 From: Jason Ian Green Date: Sun, 16 Jun 2024 14:22:14 +0100 Subject: [PATCH] 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. --- docs/strict-mode.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/strict-mode.md b/docs/strict-mode.md index d067d9d5a..5aed953ef 100644 --- a/docs/strict-mode.md +++ b/docs/strict-mode.md @@ -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