Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit 2998f85

Browse files
committed
Indicate that required can take an empty array.
1 parent 4df1a5c commit 2998f85

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

source/reference/object.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,14 @@ By default, the properties defined by the ``properties`` keyword are
193193
not required. However, one can provide a list of required properties
194194
using the ``required`` keyword.
195195

196-
The ``required`` keyword takes an array of one or more strings. Each
196+
The ``required`` keyword takes an array of zero or more strings. Each
197197
of these strings must be unique.
198198

199+
.. draft_specific::
200+
201+
--Draft 4
202+
In Draft 4, ``required`` must contain at least one string.
203+
199204
In the following example schema defining a user record, we require
200205
that each user has a name and e-mail address, but we don't mind if
201206
they don't provide their address or telephone number:

0 commit comments

Comments
 (0)