From 00586446e579d514c9c91c0126a3ed3fa691553f Mon Sep 17 00:00:00 2001 From: Evgeny Poberezkin Date: Thu, 26 Jan 2017 22:59:47 +0000 Subject: [PATCH] draft-06: propertyNames validation --- tests/draft6/propertyNames.json | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 tests/draft6/propertyNames.json diff --git a/tests/draft6/propertyNames.json b/tests/draft6/propertyNames.json new file mode 100644 index 00000000..165d17c7 --- /dev/null +++ b/tests/draft6/propertyNames.json @@ -0,0 +1,36 @@ +[ + { + "description": "propertyNames validation", + "schema": { + "propertyNames": {"maxLength": 3} + }, + "tests": [ + { + "description": "all property names valid", + "data": { + "f": {}, + "foo": {} + }, + "valid": true + }, + { + "description": "some property names invalid", + "data": { + "foo": {}, + "foobar": {} + }, + "valid": false + }, + { + "description": "object without properties is valid", + "data": {}, + "valid": true + }, + { + "description": "non-object is valid", + "data": [], + "valid": true + } + ] + } +]