Skip to content

Commit

Permalink
fix wrong descriptions of the and additionalProperties keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
mabagoury committed Apr 23, 2024
1 parent 4a0fa44 commit cfa0203
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/keywords/additionalProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
7 changes: 5 additions & 2 deletions lib/keywords/definitions.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit cfa0203

Please sign in to comment.