From 40646a65954c6e861e7eefe085fac188206fe7b3 Mon Sep 17 00:00:00 2001 From: Austin Wright Date: Wed, 30 Nov 2016 07:13:50 -0700 Subject: [PATCH] Validation: Add "propertyNames" keyword --- jsonschema-validation.xml | 11 +++++++++++ schema.json | 1 + 2 files changed, 12 insertions(+) diff --git a/jsonschema-validation.xml b/jsonschema-validation.xml index 1c3aa1c0..1ea5f54a 100644 --- a/jsonschema-validation.xml +++ b/jsonschema-validation.xml @@ -548,6 +548,17 @@ +
+ + The value of "propertyNames" MUST be a valid JSON Schema. + + + If the instance is an object, this keyword validates if every property name in the instance + validates against the provided schema. + Note the property name that the schema is testing will always be a string. + +
+
The value of this keyword MUST be an array. This array SHOULD have at diff --git a/schema.json b/schema.json index d44cd480..ec766157 100644 --- a/schema.json +++ b/schema.json @@ -124,6 +124,7 @@ ] } }, + "propertyNames": { "$ref": "#" }, "const": {}, "enum": { "type": "array",