RideNoCo / drt-tds

0 stars 1 forks source link

Logic needed for mobile phone, home phone, email address #50

Closed ehamilton7 closed 8 months ago

ehamilton7 commented 8 months ago

For the customer information, mobile phone, phone or email address (one of those three) must be present for the customer referral to be accepted so we have a way to contact them. I don't think there's a way to add this to the spec but we need the vendors to add this so we have a way to contact the customer. What are your thoughts?

asiridissa commented 8 months ago

Found a way to make part of this validation work. customerReferral.customerInfo.phone is required and tripRequest.customerInfo.phone is not required in this example.

https://json-schema.org/understanding-json-schema/reference/conditionals#dependentschemas https://www.jsonschemavalidator.net/s/Iz1yoSky image

asiridissa commented 8 months ago

This could be the final solution.

https://www.jsonschemavalidator.net/s/cLAqFt2C image