Skip to content

Commit 3280742

Browse files
committed
Validation: Add "propertyNames" keyword
1 parent f36d132 commit 3280742

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Diff for: jsonschema-validation.xml

+14
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,20 @@
550550
</t>
551551
</section>
552552

553+
<section title="propertyNames">
554+
<t>
555+
The value of "properties" MUST be a valid JSON Schema.
556+
</t>
557+
<t>
558+
If the instance is an object, this keyword validates if every property name in the instance
559+
validates against the provided schema.
560+
Note the property name that the schema is testing will always be a string.
561+
</t>
562+
<t>
563+
A missing keyword is the same as an empty schema, or a schema testing that the type is "string".
564+
</t>
565+
</section>
566+
553567
<section title="enum">
554568
<t>
555569
The value of this keyword MUST be an array. This array SHOULD have at

Diff for: schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@
124124
]
125125
}
126126
},
127+
"propertyNames": { "$ref": "#" },
127128
"const": {},
128129
"enum": {
129130
"type": "array",

0 commit comments

Comments
 (0)