Skip to content

Commit b6ea8a3

Browse files
committed
add clarification around empty-string error messages
1 parent 843a683 commit b6ea8a3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

jsonschema-core.xml

+12-2
Original file line numberDiff line numberDiff line change
@@ -2822,8 +2822,18 @@ https://example.com/schemas/common#/$defs/allOf/1
28222822
be included if the validation was successful. The value
28232823
for this property MUST be an object where the keys are the names of
28242824
keywords and the values are the error message produced by the
2825-
associated keyword. If the subschema itself is producing the
2826-
error, that error MUST be listed with an empty string key.
2825+
associated keyword.
2826+
</t>
2827+
<t>
2828+
If the subschema itself is producing the error, that error MUST be
2829+
listed with an empty string key.
2830+
<cref>
2831+
Although there may be other cases where a subschema can produce
2832+
an error, the most common case is the "false" schema. In
2833+
cases like these, there is no keyword that produces the error,
2834+
so there is nothing to use as a key. Thus the empty string
2835+
is used instead.
2836+
</cref>
28272837
</t>
28282838
<t>
28292839
The specific wording for the message is not defined by this

0 commit comments

Comments
 (0)