From 38ba00d15b208fbd5fef70b66bc09c87f0e9cf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Gorej?= Date: Mon, 8 May 2023 13:07:04 +0200 Subject: [PATCH] feat(json-schema-2020-12): add support for min/maxProperties keywords (#8627) Refs #8513 --- src/core/plugins/json-schema-2020-12/fn.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/plugins/json-schema-2020-12/fn.js b/src/core/plugins/json-schema-2020-12/fn.js index dd378633..1cacd3c3 100644 --- a/src/core/plugins/json-schema-2020-12/fn.js +++ b/src/core/plugins/json-schema-2020-12/fn.js @@ -284,5 +284,13 @@ export const stringifyConstraints = (schema) => { ) if (containsRange !== null) constraints.push(containsRange) + // validation Keywords for Objects + const objectRange = stringifyConstraintRange( + "properties", + schema?.minProperties, + schema?.maxProperties + ) + if (objectRange !== null) constraints.push(objectRange) + return constraints }