Skip to content

Commit 0bf7701

Browse files
committed
docs: add note on additionalProperties
1 parent dec3a5f commit 0bf7701

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/keywords/additionalProperties.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@ function additionalPropertyResolver({ node, data, key }: JsonSchemaResolverParam
5151
}
5252
}
5353

54+
/**
55+
* @additionalProperties only checks properties and additionalProperties
56+
*
57+
* The additionalProperties keyword is used to control the handling of extra stuff, that is,
58+
* properties whose names are not listed in the properties keyword or match any of the regular
59+
* expressions in the patternProperties keyword. By default any additional properties are allowed.
60+
* https://json-schema.org/understanding-json-schema/reference/object
61+
*/
5462
function validateAdditionalProperty({ node, data, pointer = "#", path }: JsonSchemaValidatorParams) {
5563
if (!isObject(data)) {
5664
return;

0 commit comments

Comments
 (0)