Current behavior:
The oneOf type makes a field required.
Proper behavior:
The oneOf type should make no changes to the required state of the field.
Explanation:
The oneOf type is a variation of subschema boolean logic. It's difference to anyOf which works properly in enjoi is that an instance should match exactly one of the subschemas. If it matches two or more - validation fails. But this is only if the instance value is present. That is, if the field is oneOf, but is not included as a required field it should pass validation.
Current behavior: The
oneOf
type makes a field required.Proper behavior: The
oneOf
type should make no changes to the required state of the field.Explanation: The
oneOf
type is a variation of subschema boolean logic. It's difference toanyOf
which works properly inenjoi
is that an instance should match exactly one of the subschemas. If it matches two or more - validation fails. But this is only if the instance value is present. That is, if the field isoneOf
, but is not included as arequired
field it should pass validation.