Skip to content

Commit 40646a6

Browse files
committed
Validation: Add "propertyNames" keyword
1 parent 7a5c7fc commit 40646a6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: jsonschema-validation.xml

+11
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,17 @@
548548
</t>
549549
</section>
550550

551+
<section title="propertyNames">
552+
<t>
553+
The value of "propertyNames" MUST be a valid JSON Schema.
554+
</t>
555+
<t>
556+
If the instance is an object, this keyword validates if every property name in the instance
557+
validates against the provided schema.
558+
Note the property name that the schema is testing will always be a string.
559+
</t>
560+
</section>
561+
551562
<section title="enum">
552563
<t>
553564
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)