From cfa0203927ef808a4047a4bb907b6bd421831a54 Mon Sep 17 00:00:00 2001 From: mabagoury Date: Tue, 23 Apr 2024 23:24:17 +0200 Subject: [PATCH] fix wrong descriptions of the and additionalProperties keywords --- lib/keywords/additionalProperties.js | 4 ++-- lib/keywords/definitions.js | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/keywords/additionalProperties.js b/lib/keywords/additionalProperties.js index 2ec92adb..5ea77418 100644 --- a/lib/keywords/additionalProperties.js +++ b/lib/keywords/additionalProperties.js @@ -4,8 +4,8 @@ import { getKeywordName, Validation } from "../experimental.js"; const id = "https://json-schema.org/keyword/additionalProperties"; -const description = `Validation succeeds if the schema validates \ -against each value not matched by other object applicators in this vocabulary.`; +const description = `addtionalProperties validates against properties not matched by properties \ +or patternProperties in the same sub-schema as additionalProperties.`; const compile = async (schema, ast, parentSchema) => { const propertiesKeyword = getKeywordName(schema.document.dialectId, "https://json-schema.org/keyword/properties"); diff --git a/lib/keywords/definitions.js b/lib/keywords/definitions.js index 2f62dc79..be3cdd47 100644 --- a/lib/keywords/definitions.js +++ b/lib/keywords/definitions.js @@ -4,8 +4,11 @@ import Validation from "./validation.js"; const id = "https://json-schema.org/keyword/definitions"; -const description = `This keyword is used in meta-schemas to identify the \ -required and optional vocabularies available for use in schemas described by that meta-schema.`; +const description = `The \`$defs\` keyword provides a standardized way to define \ +reusable subschemas within a single schema document, promoting modularity, reducing \ +code duplication, and improving schema organization. Each subschema within $defs has a \ +unique name, acting as a location for referencing, without directly affecting validation; \ +its value must be a valid JSON Schema.`; const compile = (schema, ast) => pipe( Browser.values(schema),