How to require one or another object property with fluent-json-schema
?
#949
Labels
help wanted
Extra attention is needed
fluent-json-schema
?
#949
How to require one or another object property with
fluent-json-schema
?I'm trying to generate the following JSON schema using
fluent-json-schema
:I need the
name
property to be mandatory, and either theid
or theaccount
property to be present.I've been able to generate the schema only by using the
raw()
method (see below).See test code on fluent-json-schema-validate-one-of-two-properties Replit.
How can I generate this JSON schema without using the
raw()
method?Your Environment
The text was updated successfully, but these errors were encountered: