Skip to content

Commit c0833df

Browse files
authored
Merge pull request json-schema-org#172 from awwright/validation-propertyNames
Validation: Add "propertyNames" keyword
2 parents e784d5d + 40646a6 commit c0833df

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

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

schema.json

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
]
133133
}
134134
},
135+
"propertyNames": { "$ref": "#" },
135136
"const": {},
136137
"enum": {
137138
"type": "array",

0 commit comments

Comments
 (0)