From 63fbf2b8146d0afd13ebd281c49f16a609f42486 Mon Sep 17 00:00:00 2001 From: Nitant Patel Date: Thu, 20 Jul 2023 11:44:33 -0400 Subject: [PATCH 1/2] docs: Add `:` as an allowed keyword character --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 5dfb0c309..87846f7b5 100644 --- a/docs/api.md +++ b/docs/api.md @@ -251,7 +251,7 @@ Add validation keyword to Ajv instance. Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. -Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, or `-`. +Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, `-`, or `:`. It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. Example Keywords: From 9ea62688a95503796afdc1a78ccaf96c87f85c73 Mon Sep 17 00:00:00 2001 From: Nitant Patel Date: Thu, 20 Jul 2023 12:15:57 -0400 Subject: [PATCH 2/2] docs: Specify that keywords expect ASCII letters --- docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api.md b/docs/api.md index 87846f7b5..2a0680730 100644 --- a/docs/api.md +++ b/docs/api.md @@ -251,7 +251,7 @@ Add validation keyword to Ajv instance. Keyword should be different from all standard JSON Schema keywords and different from previously defined keywords. There is no way to redefine keywords or to remove keyword definition from the instance. -Keyword must start with a letter, `_` or `$`, and may continue with letters, numbers, `_`, `$`, `-`, or `:`. +Keyword must start with an ASCII letter, `_` or `$`, and may continue with ASCII letters, numbers, `_`, `$`, `-`, or `:`. It is recommended to use an application-specific prefix for keywords to avoid current and future name collisions. Example Keywords: