-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi, I have tried to add an "if", "then", "else" in my schema, to add conditional required fields but I cannot make it work :-(
Using the validator I get a validation error (as expected) if I use the following:
"required": [ "transactionIdentifier", "reasonCode", "meteringpointId", "contractEnd" ]
but if I change this to:
"required": [ "transactionIdentifier", "reasonCode", "meteringpointId" ], "if": {"properties": {"header": {"properties": {"messageType": {"const": "406"}}}}}, "then": {"required": ["contractEnd"]}, "else": {"required": ["contractEnd"]}
I would expect the same result, since I have the same resulting "required" no matter what the condition..
But no, the field is not required...
So my question is, since "if" cases are not included in your Data folder. It is not implemented?