Vote count:
0
Suppose I have an object with four possible properties: a, b, c, d. a and b can only appear together (i.e., a appears if and only b appears). If a and b appear, c cannot appear (that is, a/b and c are mutually exclusive). If a and b do not appear, c may appear (but is not required to). d can appear in any combination with a/b, c, or on its own.
How do I express this as a jsonschema? I suspect I could use some combination of oneOf
and required
, but I can't figure out the proper incantation.
asked 1 min ago
Mutually exclusive property groups
Aucun commentaire:
Enregistrer un commentaire