Is is valid to have a tableType and a deliveryDistance at the same time in a customerGroup in the scenario json or is this invalid? Cause in the schema it looks like it could only be one of them, but in the example json there are both:
Hi,
A CASUAL group with both tableType and deliveryDistance is invalid. The customer group schema says so directly in its CASUAL branch:
“not”: { “required”: [“tableType”, “deliveryDistance”] }
That includes “deliveryDistance”: 0. The check is only about whether both keys are there, not their values.
For REGULAR and EVENT groups, the schema forbids deliveryDistance completely:
“deliveryDistance”: false
So for those two types, any deliveryDistance is invalid.
In short:
REGULAR / EVENT: tableType is optional, and deliveryDistance is never allowed.
CASUAL in the restaurant: tableType is optional, and there’s no deliveryDistance (a deliveryDistance of 0 is only fine without a tableType).
CASUAL delivery: deliveryDistance > 0, and no tableType.
Validate against the schema, not the example. The example JSON in the appendix is only an illustration.
