From 7dfbb1e94c66fe5141e6432e7d0bfa28771aa4d8 Mon Sep 17 00:00:00 2001 From: "Kai A. Hiller" Date: Wed, 20 Nov 2024 17:05:44 +0100 Subject: [PATCH] Add test for unevaluatedProperties --- tests/draft2020-12/unevaluatedProperties.json | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/draft2020-12/unevaluatedProperties.json b/tests/draft2020-12/unevaluatedProperties.json index ae29c9eb..5ac4b36c 100644 --- a/tests/draft2020-12/unevaluatedProperties.json +++ b/tests/draft2020-12/unevaluatedProperties.json @@ -160,6 +160,31 @@ } ] }, + { + "description": "unevaluatedProperties with non-bool additionalProperties", + "schema": { + "$schema": "https://json-schema.org/draft/2020-12/schema", + "additionalProperties": { "type": "string" }, + "unevaluatedProperties": false + }, + "tests": [ + { + "description": "with only valid additional properties", + "data": { + "foo": "foo" + }, + "valid": true + }, + { + "description": "with invalid additional properties", + "data": { + "foo": "foo", + "bar": 1 + }, + "valid": false + } + ] + }, { "description": "unevaluatedProperties with nested properties", "schema": {